give view permission to all users django code example
Example 1: loginrequiredmixin
from django.contrib.auth.mixins import LoginRequiredMixin
LOGIN_URL = 'your_url'
Example 2: how to create staff account in django
user = User.objects.create_user('john', '[email protected]', 'johnpassword')
user.is_staff=True
user.save()