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 = User.id

But it say's that User has no id :(

I think that other method is to get the ID from "request.user.id", but
I don't know how to get this in _pre_save() function.

---------------------------------------------------------
Next problem :)

I have the standart admin interface and I added new user, but I can't
login with it. I figured out that field passord is not an plain
password field, but I need to specify the salt and password. How can I
customize the admin interface to add normaly users with their
passwords.

Sorry for bad english :)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to