Re: init ignoring 127.0.0.1
On Wednesday 02 Nov 2005 5:16 pm, Kenneth Gonsalves wrote: > On Wednesday 02 Nov 2005 5:03 pm, Marcos Sánchez Provencio wrote: > > Is 127.0.0.1 not localhost? Can you explain that? The 127.X.X.X net > > _is_ localhost by IP specs, I thought. > > this is running in a freebsd jail - 'localhost' will apply to whats > inside the jail. The postgres database is running on the same > physical machine but outside the jail - so it needs to be addressed > at 127.0.0.1, and not at 'localhost' - i am no expert in these things > and anyway they are irrelevant to my question. My question is: when i > put a string as '127.0.0.1' for the db host, why doesnt init try to > access that? As mentioned, in the the other site on the same server, > django has no problem in accessing the database at '127.0.0.1'. So i > feel it is some bug in init solved - i had mispelt the db name -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!
Re: I want to start a django project for a forum
Hi Luke. my aim is not to do a drop-in replacement for a phpBB. but more for integrating discussions into other parts of applications, and to do this I think it needs to in django. I have got a wiki page up, http://wiki.zilbo.com/ForumDesign (yes it took me this long to get the silly thing running) to put a list of features up. and just to flesh out the idea a bit more.. I don't think this needs to be a 'phpbb' killer to be successful, just something which can: - be used as a sample of how to build a django app - be used/dropped into your django app easily. my main use for this would be for me to write applications like mp3.com and tv.com. On 11/1/05, Luke Plant <[EMAIL PROTECTED]> wrote: > > On Tue, 1 Nov 2005 11:16:14 +1100 Ian Holsman wrote: > > > > > is anyone else interested in joining? I was thinking of similar to > > what phpBB does. > > > > If so I propose we open up a sourceforge project, or perhaps we could > > even host it on code.djangoproject.com if they let us ;-) > > > > any volunteers? > > If you need a bbcode parser that outputs valid XHTML, I have one that I > wrote for my current Django project (surprisingly, I couldn't find one > written in python on the 'net, and all the PHP ones I found generated > tag soup). > > But, like Jeffrey said, do we need yet another forum, especially if > it's just a clone? > > I think there can be good reasons for writing your own forum. My > current Django project has a message board system that > 1) is quite a bit simpler and less intimidating than phpBB, > 2) includes features specific to my site, > 3) is fairly tightly integrated into the rest of the site. > These things make the forum I've written not at all suitable for re-use > as a standalone project. > > In short, if I wanted a standalone project I can just drop in, I'd use > phpBB (or similar). If I need something much more integrated, I'm > going to write it myself, as a generic forum system probably isn't going > to cut it, even if it's written in Django. I guess there could be a > case for some writing some Django models and views that would be easy to > drop in to any other Django app, but you would have to think carefully > about how you designed them I think. > > Luke > > -- > "I'm at peace with the world. I'm completely serene. I know why I was > put here and why everything exists. I am here so everybody can do what > I want. Once everybody accepts it, they'll be serene too." (Calvin and > Hobbes) > > Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ > -- [EMAIL PROTECTED] -- ++61-3-9877-0909 If everything seems under control, you're not going fast enough. - Mario Andretti
Re: getting id of logged user in admin site
hello gregory, ticket is #714. bye, Flavio
Re: problem lookup function
On 11/2/05, Grigory Fateyev <[EMAIL PROTECTED]> wrote: > > Hello! > > I have myapp model: > > class Category(meta.Model): > category_name = meta.CharField(maxlength=30) > category_image = meta.ImageField(upload_to="/var/www/html/media") > > class Article(meta.Model): > category_name = meta.ForeignKey(Category) > > How to get list of category_name from class Category? > I suspect this should work when in a view (though I don't have a python interpreter handy to test it): >>> from django.models.myapp import categories >>> category_names = [ c.category_name | c in categories.get_list() ] --joey
Re: Doing "OR" operation with Database API?
Got it. Thanks Adrian. Armin
problem lookup function
Hello! I have myapp model: class Category(meta.Model): category_name = meta.CharField(maxlength=30) category_image = meta.ImageField(upload_to="/var/www/html/media") class Article(meta.Model): category_name = meta.ForeignKey(Category) How to get list of category_name from class Category? Thanks! --
Re: Doing "OR" operation with Database API?
>mymodule.get_list(_or=[[('from__icontains', 'armin'), >('to__icontains', 'armin')]]) Wow. And I thought I knew all about the django query API :-) Hey, that's actually quite helpfull for my search engine stuff, as I can reduce the code a bit with that. Only thing left would be a icontainsnot query type and I could remove it even more ... bye, Georg
Re: getting id of logged user in admin site
Hello Flavio Curella! On Tue, 01 Nov 2005 16:45:08 -0800 you wrote: > > thanks Hugo. > > I think this is a common case: I (and peraphs many people) prefer > django to other frameworks because of its admin application: half a > work is already made. I think a feature like this will be very helpful > to many people, so I will open a ticket on django's trac. It is very interestingc for me. What is the number of ticket? -- Всего наилучшего! greg [at] anastasia [dot] ru Григорий.
Re: init ignoring 127.0.0.1
On Wednesday 02 Nov 2005 5:03 pm, Marcos Sánchez Provencio wrote: > Is 127.0.0.1 not localhost? Can you explain that? The 127.X.X.X net > _is_ localhost by IP specs, I thought. this is running in a freebsd jail - 'localhost' will apply to whats inside the jail. The postgres database is running on the same physical machine but outside the jail - so it needs to be addressed at 127.0.0.1, and not at 'localhost' - i am no expert in these things and anyway they are irrelevant to my question. My question is: when i put a string as '127.0.0.1' for the db host, why doesnt init try to access that? As mentioned, in the the other site on the same server, django has no problem in accessing the database at '127.0.0.1'. So i feel it is some bug in init > > El mié, 02-11-2005 a las 16:28 +0530, Kenneth Gonsalves escribió: > > hi > > i have an application running on a freebsd 'jail'. The postgresql > > database is hosted on 127.0.0.1 (not localhost). My application > > runs perfectly with the DATABASE_HOST = '127.0.0.1'. I have now > > started a second app on the same server. When i run django-admin.py > > init, it is unable to create the database because it is trying to > > find the database on the ip address of the server on which it is > > running and not on 127.0.0.1. I am doing this on the latest svn of > > django - previously i had done this on svn #6xx. Any clues? -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!
Re: init ignoring 127.0.0.1
Is 127.0.0.1 not localhost? Can you explain that? The 127.X.X.X net _is_ localhost by IP specs, I thought. El mié, 02-11-2005 a las 16:28 +0530, Kenneth Gonsalves escribió: > hi > i have an application running on a freebsd 'jail'. The postgresql > database is hosted on 127.0.0.1 (not localhost). My application runs > perfectly with the DATABASE_HOST = '127.0.0.1'. I have now started a > second app on the same server. When i run django-admin.py init, it is > unable to create the database because it is trying to find the database > on the ip address of the server on which it is running and not on > 127.0.0.1. I am doing this on the latest svn of django - previously i > had done this on svn #6xx. Any clues? -- Marcos Sánchez Provencio <[EMAIL PROTECTED]>
init ignoring 127.0.0.1
hi i have an application running on a freebsd 'jail'. The postgresql database is hosted on 127.0.0.1 (not localhost). My application runs perfectly with the DATABASE_HOST = '127.0.0.1'. I have now started a second app on the same server. When i run django-admin.py init, it is unable to create the database because it is trying to find the database on the ip address of the server on which it is running and not on 127.0.0.1. I am doing this on the latest svn of django - previously i had done this on svn #6xx. Any clues? -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!
Re: Doing "OR" operation with Database API?
mymodule.get_list(_or=[[('from__icontains', 'armin'), ('to__icontains', 'armin')]]) Don't ask... Stefan On 2. Nov 2005, at 05:14, Armin wrote: How can I do 'or' in Django's Database API. Something like this: select * from message where from = 'armin' OR to = 'armin' Thank you in advance for your response. You guys are great. Armin -- Anything that happens, happens. --Douglas Adams