Re: Need Advise on the best way to track how much time a user is logged in.....

2013-08-23 Thread Huu Da Tran
On Thursday, August 22, 2013 3:09:45 PM UTC-4, 7equiv...@gmail.com wrote: > My users will not be able to logout by closing a browser because they have > no such interaction with the system. They will be passing an RFID tag over > a reader to unlock the door and clock in and a python script will

Re: Need Advise on the best way to track how much time a user is logged in.....

2013-08-22 Thread Anurag Chourasia
So they will present the RFID Tag to the reader at the time of login .and logout also? You could do this directly in Python thenCapture the logout read (same way as login) and use the datetime module to generate the current time and save it in the Database. Just trying to understand what i

Re: Need Advise on the best way to track how much time a user is logged in.....

2013-08-22 Thread 7equivalents
My users will not be able to logout by closing a browser because they have no such interaction with the system. They will be passing an RFID tag over a reader to unlock the door and clock in and a python script will handle the loging in and out. So if I can get the logout to time stamp a databas

Re: Need Advise on the best way to track how much time a user is logged in.....

2013-08-22 Thread 7equivalents
I notice the Django.contrib.Auth has a logout function, is there anyway to connect a timestamp to a model when the user uses the logout function? My users will be using the log out function. This is for a time clock I'm building using RFID tags. > > You cannot. The only thing you can do is to

Re: Need Advise on the best way to track how much time a user is logged in.....

2013-08-22 Thread Tom Evans
On Thu, Aug 22, 2013 at 3:06 PM, <7equivale...@gmail.com> wrote: > I have created a model that gives me a time stamp when a user logs in. I > connected the 'user_logged_in signal' to a function: > > def update_user_login(sender, user), **kwargs): > user.userlogin_set.create(timestamp=user.las

Need Advise on the best way to track how much time a user is logged in.....

2013-08-22 Thread 7equivalents
I have created a model that gives me a time stamp when a user logs in. I connected the 'user_logged_in signal' to a function: def update_user_login(sender, user), **kwargs): user.userlogin_set.create(timestamp=user.last_login) user.save() So this basically helps me track the login time,