Re: Where to put function to instantiate and save a model object?

2007-02-03 Thread Rob Hudson
Russell Keith-Magee wrote: > Look in django.contrib.auth.models for UserManager for implementation details. Nice. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Where to put function to instantiate and save a model object?

2007-02-02 Thread Russell Keith-Magee
On 2/3/07, Rob Hudson <[EMAIL PROTECTED]> wrote: > > Log(user=request.user, session=request.session.session_key, > varname='somename').save() > But I'm finding that I'm writing the above line in a number of > places. I'd like to create a method to do this for me. But where? Why not take

Where to put function to instantiate and save a model object?

2007-02-02 Thread Rob Hudson
I have a model called "Log" which logs access to certain pages or sets variables that we're tracking. The way I'm inserting new records into the log table is like this: Log(user=request.user, session=request.session.session_key, varname='somename').save() But I'm finding that I'm writing