How to Solve NameError: name 'staff_member_required' is not defined -- django

Solution: Import the 'staff_member_required' module

To Solve the error, add the following line to the top of your code.

from django.contrib.admin.views.decorators import staff_member_required

 

For more information:
Python django staff_member_required