Gacha wrote:
> I created a simple model "articles" and I added field:
> author= meta.ForeignKey(User,editable=False)
>
> When I add new artcicle I want to assign to this field the current user
> ID, but so far no luck :(
>
> I tryed:
> def _pre_save(self):
> from django.models.auth.u
I solved this problem by this patch:
http://code.djangoproject.com/attachment/ticket/1132/current_user_field_patch.2.diff
Now I use:
author = meta.CurrentUserField(update_on_edit=False)
--
But the problem about User management is not solved :(
--~--~-~--~~-
I created a simple model "articles" and I added field:
author = meta.ForeignKey(User,editable=False)
When I add new artcicle I want to assign to this field the current user
ID, but so far no luck :(
I tryed:
def _pre_save(self):
from django.models.auth.users import User
self.author = Us
3 matches
Mail list logo