Re: logged-in user id as default value on ForeignKey relation

2006-07-17 Thread Patrick J. Anderson
Malcolm Tredinnick wrote: > On Mon, 2006-07-17 at 09:41 -0700, Patrick J. Anderson wrote: >> Sorry, but would you be able to explain this in detail? I was thinking >> about acomplishing this in model classes, not in views, so I'm not sure >> if I understand what you mean. > > You have to pass the

Re: logged-in user id as default value on ForeignKey relation

2006-07-17 Thread Malcolm Tredinnick
On Mon, 2006-07-17 at 09:41 -0700, Patrick J. Anderson wrote: > Sorry, but would you be able to explain this in detail? I was thinking > about acomplishing this in model classes, not in views, so I'm not sure > if I understand what you mean. You have to pass the information through from a view, t

Re: logged-in user id as default value on ForeignKey relation

2006-07-17 Thread Patrick J. Anderson
Sorry, but would you be able to explain this in detail? I was thinking about acomplishing this in model classes, not in views, so I'm not sure if I understand what you mean. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

Re: logged-in user id as default value on ForeignKey relation

2006-07-17 Thread Grigory Fateyev
Hello Patrick J. Anderson! On Mon, 17 Jul 2006 10:25:25 -0500 you wrote: > > 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_add

logged-in user id as default value on ForeignKey relation

2006-07-17 Thread Patrick J. Anderson
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.DateT