is_staff decorator
Decorator for views that checks that the user is staff, redirecting to the log-in page if necessary. A wrapper for user_passes_test decorator based on login_required Possible usage: @is_staff def view.... urlpatterns = patterns('', (r'^databrowse/(.*)', is_staff(databrowse.site.root)), )
- decorator
- auth