Skip to content

Django Tutorial 6 - User Authentication Part 1 - Hacked Existence -

Django enables the authentication system by default in new projects. Open your settings.py file and ensure the following apps are listed in INSTALLED_APPS :

from django.contrib.auth.decorators import login_required from django.shortcuts import render @login_required def secret_page(request): return render(request, 'secret.html') Use code with caution. Copied to clipboard Django enables the authentication system by default in

: Verifies that a user is who they claim to be. Django enables the authentication system by default in