hello gregory,
ticket is #714.
bye,
Flavio
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
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
>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
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.
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()
>
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
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
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
9 matches
Mail list logo