(request, uid)
return data
Details for a user.

    Parameters:
    id -- the uid of the `User`.
Details for a user.
Details for a user .
def user_details(request, uid):
    """
    Details for a user.

    Parameters:
    id -- the uid of the `User`.
    """

    user = User.objects.filter(profile__uid=uid).first()
    if not user:
        return {}

    days_ago = (datetime.now().date() - user.profile.date_joined.date()).days
    data = {
        'uid': user.profile.uid,
        'name': user.profile.name,
        'date_joined': util.datetime_to_iso(user.profile.date_joined),
        'last_login': util.datetime_to_iso(user.profile.last_login),
        'joined_days_ago': days_ago,
        'vote_count': Vote.objects.filter(author=user).count(),
    }
    return data
def user_details ( request , uid ) : user = User . objects . filter ( profile__uid = uid ) . first ( ) if not user : return { } days_ago = ( datetime . now ( ) . date ( ) - user . profile . date_joined . date ( ) ) . days data = { 'uid' : user . profile . uid , 'name' : user . profile . name , 'date_joined' : util . datetime_to_iso ( user . profile . date_joined ) , 'last_login' : util . datetime_to_iso ( user . profile . last_login ) , 'joined_days_ago' : days_ago , 'vote_count' : Vote . objects . filter ( author = user ) . count ( ) , } return data