Lets say you have certain views you want to control the access and should be only accessible by staff members.
Its two lines of code change and you are done.
from django.contrib.admin.views.decorators import staff_member_required
in your module’s views.py
When user tries to access the view, it will check if user is authorized staff member. If not it will prompt for admin login screen.