Re: django auth user - difference between last login and now

2013-04-17 Thread Bill Freeman
One way is to replace/wrap/monkey-patch the login view to save a copy of the last login element for the looked up user in a local variable, and then, if login is successful, and the last login was long enough ago, modify the successful login redirect to your "instructions" page. On Tue, Apr 16, 2

Re: django auth user - difference between last login and now

2013-04-16 Thread Jaimin Patel
Any suggestion on this question? On Friday, April 12, 2013 10:35:54 AM UTC-4, Jaimin Patel wrote: > > Hello, > > I would like to provide some instructions if user come after gap of 1 week > or so. I was hoping that I can do that by - > > (datetime.now()-user.last_login) > timedelta(days=7) > > T

django auth user - difference between last login and now

2013-04-12 Thread Jaimin Patel
Hello, I would like to provide some instructions if user come after gap of 1 week or so. I was hoping that I can do that by - (datetime.now()-user.last_login) > timedelta(days=7) Though by the time it comes to my view last login is already updated by auth user model of django, so in my applica