def user_loggedin(sender, **kwargs):
    """ collect metrics about user logins """
    values = {
        'value': 1,
        'path': kwargs['request'].path,
        'user_id': str(kwargs['user'].pk),
        'username': kwargs['user'].username,
    }
    write('user_logins', values=values)
def user_loggedin ( sender , ** kwargs ) : values = { 'value' : 1 , 'path' : kwargs [ 'request' ] . path , 'user_id' : str ( kwargs [ 'user' ] . pk ) , 'username' : kwargs [ 'user' ] . username , } write ( 'user_logins' , values = values )
collect metrics about user logins