DuncanM wrote: > I want to create a model that doesn't ask for the users input on the > date, it takes the days date automatically, .... > Also I would ideally like the author to be autopopulated by whoever > posts the item using the admin interface. How would I do this?
In your models.py include this: from lab.middleware import threadlocals # For information on threadlocals see: # http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser Then in the place where you need the 'user' use this: self.who = str(threadlocals.get_current_user()) Mike --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---

