Re: getting id of logged user in admin site

2005-11-02 Thread Flavio Curella
hello gregory, ticket is #714. bye, Flavio

Re: getting id of logged user in admin site

2005-11-02 Thread Grigory Fateyev
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 helpf

Re: getting id of logged user in admin site

2005-11-01 Thread Flavio Curella
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. Thanks to all, Flavi

Re: getting id of logged user in admin site

2005-11-01 Thread hugo
>What I want to do is to save the article with the id of user that is >saving the article, without the need to select an user/author from a >menu. The model code doesn't have access to the request, so you are out of luck. It's simple to do in your own applications (as you have full control over y

Re: getting id of logged user in admin site

2005-11-01 Thread Flavio Curella
your snippet works, but it returns the id of the author of an articles already saved in the database. What I want to do is to save the article with the id of user that is saving the article, without the need to select an user/author from a menu.

Re: getting id of logged user in admin site

2005-11-01 Thread Joey Coleman
Try the following: On 10/27/05, Flavio Curella <[EMAIL PROTECTED]> wrote: > > hi all, I've this model: > > from django.core import meta > from django.models.auth import User > > class Article(meta.Model): > title = meta.CharField(maxlength=255) > content = meta.TextField() >

Re: getting id of logged user in admin site

2005-11-01 Thread Grigory Fateyev
Hello Flavio Curella! On Tue, 01 Nov 2005 03:33:01 -0800 you wrote: > > > Grigory Fateyev wrote: > > Hello Flavio Curella! > > On Thu, 27 Oct 2005 20:20:23 - you wrote: > > > > > > > > hi all, I've this model: > > > > > > from django.core import meta > > > from django.models.auth import Use

Re: getting id of logged user in admin site

2005-11-01 Thread Flavio Curella
Grigory Fateyev wrote: > Hello Flavio Curella! > On Thu, 27 Oct 2005 20:20:23 - you wrote: > > > > > hi all, I've this model: > > > > from django.core import meta > > from django.models.auth import User > > > > class Article(meta.Model): > > title = meta.CharField(maxlength=255) > > c

Re: getting id of logged user in admin site

2005-10-28 Thread Grigory Fateyev
Hello Flavio Curella! On Thu, 27 Oct 2005 20:20:23 - you wrote: > How can I save the field 'author' with the id of current user? I think > to use 'default' attribute, something like this: > author = meta.ForeignKey(User, default=???) > but how can I get current uesre's id? (user.id does