Fixed #24253 -- Documented staff_member_required decorator.

This commit is contained in:
Andrei Kulakov 2015-03-09 14:50:01 -04:00 committed by Tim Graham
parent b089759d60
commit e8a758e941
2 changed files with 35 additions and 1 deletions

View file

@ -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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~