In my model I'd like to keep track of who added/updated a particular record.
class Entry(models.Model):
...
time_added = models.DateTimeField(auto_now_add = True, editable =
False)
user_added = models.ForeignKey(User, default = ?, editable = False)
time_updated = models.DateTimeField(auto_now = True, editable = False)
user_updated = models.ForeignKey(user, default = ?, editable = False)
How could I add a currently logged in (to admin interface) user id
automatically as a value for that field? Is it possible to do that
without writing extra class methods? Any helpful suggestions or tips are
appreciated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---