staff_member_required(redirect_field_name='next', login_url='admin:login') [source]
This decorator is used on the admin views that require authorization. A view decorated with this function will having the following behavior:
If the user is logged in, is a staff member (User.is_staff=True), and is active (User.is_active=True), execute the view normally. Otherwise, the request will be redirected to the URL specified by the login_url parameter, with the originally requested path in a query str