def update_last_login(sender, user, **kwargs):
 user.last_login = timezone.now()
 user.save()

def update_last_login ( sender , user , ** kwargs ) : user . last_login = timezone . now ( ) user . save ( )
a signal receiver which updates the last_login date for the user logging in .