from django.contrib.admin.views.decorators import staff_member_required @staff_member_required def my_view(request): ...