Wednesday, January 28, 2015

Re: How to detect (daily) User Login when using cookies?

Yes that would be enough. I know in the User Model there is last_login but that is only updated when the User actually logs in. And the signal from django-allauth is also only send when the user uses the login form. The only other alternative I found was to check in every view I have for request.user and store / update But this is quite ugly.

On Tuesday, January 27, 2015 at 9:00:15 PM UTC+1, Collin Anderson wrote:

Would it make sense to simply keep a record of when the last time you've seen the user is?


On Friday, January 23, 2015 at 4:43:41 AM UTC-5, Tobias Dacoir wrote:
I'm using django-allauth and I receive a signal when a user logs in. Now I want to store each day the user logs in. However, when the user does not logout he can still log in the next day thanks to the cookies. I know that I can set SESSION_EXPIRE_AT_BROWSER_CLOSE to True in But this may annoy some Users.

So is there a way to use cookies but still tell if a User has accessed the site for the first time today?

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment