Re: Sample Custom Decorator

2011-10-11 Thread Kurtis Mullins
tartTime = >>> datetime.datetime.now(), >>> >>> AssessmentId=assessmentid, ResidentId=resid, >>>Modified = modified, >>>IpAddress = ipaddr, >>> Faci

Re: Sample Custom Decorator

2011-10-11 Thread Steven Cummings
me = >> datetime.datetime.now(), >> >> AssessmentId=assessmentid, ResidentId=resid, >>Modified = modified, >>IpAddress = ipaddr, >> Facility=facility) >>#print record.Modified, record.Action, 

Re: Sample Custom Decorator

2011-10-11 Thread Kurtis Mullins
>results = func( *args, **kwargs) >#record.StopTime = datetime.datetime.now() >#record.save() > return results >print 'done' >return wrapped > > > @decorate >

RE: Sample Custom Decorator

2011-10-11 Thread Sells, Fred
#record.StopTime = datetime.datetime.now() #record.save() return results print 'done' return wrapped @decorate def command(request, *args, **kwargs): ... -Original Message- From: d

Sample Custom Decorator

2011-10-11 Thread Kurtis
Hey Guys, Would anyone be willing to show me an example of a very simple and dumb decorator for views? I've been trying to read the existing decorators and play with a couple of snippets but I'm having a lot of trouble with two aspects -- grabbing the User Instance and Redirecting somewhere beside