auth/decorators.py
def require_signed_in_user(func):
    """A decorator that limits access to signed-in users.

    Note that limiting acces to signed-in users is the default
    behavior for all pages outside of the /auth/ namespace.
    """
    def wrapper(request, *args, **kwargs):
        if getattr(request, 'user') is None:
            # If the user is not signed in, send them off to somewhere
            # they can log in.
            login_url = auth.create_login_url(request.path)
            return http.HttpResponseRedirect(login_url)
        return func(request, *args, **kwargs)
    return wrapper
A decorator that limits access to signed-in users.

    Note that limiting acces to signed-in users is the default
    behavior for all pages outside of the /auth/ namespace.
    
A decorator that limits access to signed-in users.
Note that limiting acces to signed-in users is the default
behavior for all pages outside of the /auth/ namespace.
A decorator that limits access to signed - in users . Note that limiting acces to signed - in users is the default behavior for all pages outside of the / auth / namespace .
def require_signed_in_user(func):
    def wrapper(request, *args, **kwargs):
        if getattr(request, 'user') is None:
            login_url = auth.create_login_url(request.path)
            return http.HttpResponseRedirect(login_url)
        return func(request, *args, **kwargs)
    return wrapper
def require_signed_in_user ( func ) : def wrapper ( request , * args , ** kwargs ) : if getattr ( request , 'user' ) is None : login_url = auth . create_login_url ( request . path ) return http . HttpResponseRedirect ( login_url ) return func ( request , * args , ** kwargs ) return wrapper
A decorator that limits access to signed-in users.
A decorator that limits access to signed - in users .
"""A decorator that limits access to signed-in users.

    Note that limiting acces to signed-in users is the default
    behavior for all pages outside of the /auth/ namespace.
    """ # If the user is not signed in, send them off to somewhere # they can log in.
func