django admin show authenticated users code example
Example 1: django login required decorator
from django.contrib.auth.decorators import login_required
@login_required
def my_view(request):
...
Example 2: how to create staff account in django
user = User.objects.create_user('john', '[email protected]', 'johnpassword')
user.is_staff=True
user.save()