Re: Adding features to several models

2005-12-19 Thread Ferry Dave
Hi Adrian, thanks for your reply. Adrian Holovaty <[EMAIL PROTECTED]> wrote: > We're working right now on a "magic-removal" branch, which will make > this easier by letting you override the standard get_list(), etc., > functions. This sounds very interesting. There are many parts of Django, wh

Re: getting a list of values automatically

2005-12-19 Thread Kenneth Gonsalves
On Monday 19 Dec 2005 12:42 pm, Kenneth Gonsalves wrote: > Here a person has a rank and a status, and the rank has powers > alloted to it. I want to get a list of dictionaries like this: > > name: 'name', > rank: 'get_rank(), > powers: 'get_power_list(), > status: 'get_status() solved: person.get

user information on website

2005-12-19 Thread patrick kranzlmüller
i´m sorry if this is a trivial question, but i´m struggling with getting the username displayed on my app. user is already logged in, using django authentication (for my app is part of the admin-interface) - i just need to output the name. patrick

Re: php, mod_python postgresql conflict?

2005-12-19 Thread Bryan Murdock
For the record, there seems to be no issue with postgreSQL (thankfully!). On 12/18/05, Burhan <[EMAIL PROTECTED]> wrote: > > What environment have you seen this problem? I am running mod_php, > mod_python and MySQL (and PostgreSQL) all on one server with Apache2 -- > haven't run into your issue.

forwarding email to a django application

2005-12-19 Thread Frank
django-ers- i am really new to django, but i like what i see. i like it so much that the application i started writing with rails -- is now going to be powered by django. hot. anyway, the core part of the project allows for incoming emails to be sent to the application, the application then read

Re: user information on website

2005-12-19 Thread Bryan Murdock
On 12/19/05, patrick kranzlmüller <[EMAIL PROTECTED]> wrote: > > i´m sorry if this is a trivial question, but i´m struggling with > getting the username displayed on my app. > user is already logged in, using django authentication (for my app is > part of the admin-interface) - i just need to outp

Re: forwarding email to a django application

2005-12-19 Thread Adrian Holovaty
On 12/19/05, Frank <[EMAIL PROTECTED]> wrote: > anyway, the core part of the project allows for incoming emails to be > sent to the application, the application then reads the contents and > interactions with the model. i found out how to do this with rails > (http://wiki.rubyonrails.com/rails/pag

Re: user information on website

2005-12-19 Thread patrick kranzlmüller
thanks, "context = Context( request )" was the key. Am 19.12.2005 um 15:38 schrieb Bryan Murdock: On 12/19/05, patrick kranzlmüller <[EMAIL PROTECTED]> wrote: i´m sorry if this is a trivial question, but i´m struggling with getting the username displayed on my app. user is already logged in

get_list() with foreignkey-parameters

2005-12-19 Thread patrick kranzlmüller
first issue: this works fine: milestone_list = milestones.get_list(id__exact=3, order_by=['-id']) this doesn´t: milestone_list = milestones.get_list(responsible__exact=1, order_by=['-id']) the model looks like; responsible = meta.ForeignKey(auth.User) second issue: i´m now able to display

Re: get_list() with foreignkey-parameters

2005-12-19 Thread Adrian Holovaty
On 12/19/05, patrick kranzlmüller <[EMAIL PROTECTED]> wrote: > this works fine: > milestone_list = milestones.get_list(id__exact=3, order_by=['-id']) > > this doesn´t: > milestone_list = milestones.get_list(responsible__exact=1, > order_by=['-id']) > > the model looks like; > responsible = meta.Fo

Re: get_list() with foreignkey-parameters

2005-12-19 Thread Andreas Stuhlmüller
Hi Patrick, > this doesn´t: > milestone_list = milestones.get_list(responsible__exact=1, > order_by=['-id']) Try this: milestone_list = milestones.get_list(responsible__id__exact=1, order_by=['-id']) "1" is the user's id, so this should work: milestone_list = milestones.get_list(responsible__i

Re: get_list() with foreignkey-parameters

2005-12-19 Thread Grigory Fateyev
Hello patrick kranzlm_ller! On Mon, 19 Dec 2005 17:03:21 +0100 you wrote: > > first issue: > > this works fine: > milestone_list = milestones.get_list(id__exact=3, order_by=['-id']) > > this doesn_t: v> milestone_list = milestones.get_list(responsible__exact=1, > order_by=['-id']) milestone_

Re: get_list() with foreignkey-parameters

2005-12-19 Thread patrick kranzlmüller
thanks. i then used milestone_list = milestones.get_list(responsible__id__exact=request.user.id) to display the milestones for the logged-in user. seems to work. Am 19.12.2005 um 17:07 schrieb Adrian Holovaty: On 12/19/05, patrick kranzlmüller <[EMAIL PROTECTED]> wrote: this works fine:

Re: user information on website

2005-12-19 Thread Ivan Fedorov
patrick kranzlmüller пишет: > > thanks, "context = Context( request )" was the key. The REAL key was "from django.core.extensions import DjangoContext as Context" You must use DjangoContext instead of Context.

Re: php, mod_python postgresql conflict?

2005-12-19 Thread stava
My two-cents worth: I've used mod_php and mod_python together (accessing mysql) successfully for a good while on a SuSE 9.3 platform (right out of the box setup, no fiddling). R /LarS

django-scgi.py and django-fcgi.py scripts under Python 2.3

2005-12-19 Thread hugo
Hi, as I discovered, there was a bug in those scripts when run under Python 2.3 - they leaked socket descriptors and so sooner or later hit a OS configured limit of maximum open file descriptors. I think I fixed that problem in the newest versions, so if you use them, you better fetch new version

Re: Comments on Ruby code slides from Snakes and Rubies?

2005-12-19 Thread Bill de hÓra
braver wrote: > I was reading > > http://www.loudthinking.com/arc/000545.html > > and it has an emphasis on Ruby's "beauty", and parsimony, as > demonstrated by the code excerpt (David: "I was more surprised to learn > that someone would actually prefer something like"): > > class Project(meta.

Django ImageField don't work properly

2005-12-19 Thread Batiste
Hi, Form this model - class Image(meta.Model): class META: admin = meta.Admin() image = meta.ImageField(upload_to='images') annonce = meta.ForeignKey(Annonce,verbose_name="L'annonce") def __repr__(self): return self.image

How to design urls like record1.domain.com

2005-12-19 Thread Armin
Hi, I want to give my users their own URL such as: user1.domain.com user2.domain.com and so forth. Does anyone have experience with this? Thanks, Armin

Re: How to design urls like record1.domain.com

2005-12-19 Thread oggie rob
Do you mean "Django" users, that are added and edited in the database (as opposed to OS users)? And how often/how many of these users are you thinking of managing? -rob

Re: How to design urls like record1.domain.com

2005-12-19 Thread Ian Holsman
If you mean user as a regular user in the users table in the DB I would hack up a mod_python handler to look at the hostname, and adjust the session cookie accordingly. see http://svn.zilbo.com/svn/django/snippets/modpython_apacheauth.py for an idea on how to approach this. if you are talking abo

subclasses reverse field order

2005-12-19 Thread Kenneth Gonsalves
hi, i created a subclass - appears fine in the admin. One major problem - the fields in the admin appear in reverse order to the fields in the parent. What to do? -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!