From e8a758e941bb36f69b6224b73b00b9d6a814bbdc Mon Sep 17 00:00:00 2001 From: Andrei Kulakov Date: Mon, 9 Mar 2015 14:50:01 -0400 Subject: Fixed #24253 -- Documented staff_member_required decorator. --- docs/topics/auth/default.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'docs/topics') diff --git a/docs/topics/auth/default.txt b/docs/topics/auth/default.txt index 156746e3c2..0cea34ed1a 100644 --- a/docs/topics/auth/default.txt +++ b/docs/topics/auth/default.txt @@ -485,7 +485,15 @@ The login_required decorator .. note:: - The login_required decorator does NOT check the is_active flag on a user. + The ``login_required`` decorator does NOT check the ``is_active`` flag on a + user. + +.. seealso:: + + If you are writing custom views for Django's admin (or need the same + authorization check that the built-in views use), you may find the + :func:`django.contrib.admin.views.decorators.staff_member_required` + decorator a useful alternative to ``login_required()``. Limiting access to logged-in users that pass a test ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.3