Maru Kun

83%
Flag icon
The code in login_required() checks to see if a user is logged in, and Django will run the code in topics() only if they are. If the user is not logged in, they’re redirected to the login page. To make this redirect work, we need to modify settings.py so Django knows where to find the login page. Add the following at the very end of settings.py:
Python Crash Course: A Hands-On, Project-Based Introduction to Programming
Rate this book
Clear rating