def auth(request):
    """
    Returns context variables required by apps that use Django's authentication
    system.
    If there is no 'user' attribute in the request, uses AnonymousUser (from
    django.contrib.auth).
    """

def get_user():
    if hasattr(request, 'user'):
        pass
How to do a DetailView of Users in Django?