Login

Tag "staff"

Snippet List

Django Sudo

Staff can log in as a user, from a url to help with customer support or debugging.

  • admin
  • user
  • login
  • staff
  • sudo
Read More

staff_or_404 Decorator

Sometimes I don't want to reveal a staff-only view so I created this decorator, using ``django.contrib.admin.views.decorators.staff_member_required`` as my boilerplate. Non staff members are kicked to the 404 curb. Suggestion: Create a file, ``decorators.py`` in your project (or single app) and import like so: ``from myproject.app_name.decorators import staff_or_404``.

  • user
  • auth
  • decorators
  • staff
Read More

3 snippets posted so far.