module documentation
Undocumented
Function | login |
Decorator for views that checks that the user is logged in, redirecting to the log-in page if necessary. |
Function | permission |
Decorator for views that checks whether a user has a particular permission enabled, redirecting to the log-in page if necessary. If the raise_exception parameter is given the PermissionDenied exception is raised. |
Function | user |
Decorator for views that checks that the user passes the given test, redirecting to the log-in page if necessary. The test should be a callable that takes the user object and returns True if the user passes. |
def login_required(function=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url=None):
(source)
¶
Decorator for views that checks that the user is logged in, redirecting to the log-in page if necessary.
Decorator for views that checks whether a user has a particular permission enabled, redirecting to the log-in page if necessary. If the raise_exception parameter is given the PermissionDenied exception is raised.
def user_passes_test(test_func, login_url=None, redirect_field_name=REDIRECT_FIELD_NAME):
(source)
¶
Decorator for views that checks that the user passes the given test, redirecting to the log-in page if necessary. The test should be a callable that takes the user object and returns True if the user passes.