Make Applications Real•Reading lesson•Free
Overview
No account is required. Learn the material, try the examples, and mark it complete when you are ready to move on. Sign in with email only if you want to save progress across devices.
Project 3 - Add Users and Authentication
This is a small multi-user Django application.
Run
bash
python -m pip install -r requirements.txt
python manage.py migrate
python manage.py runserverOpen /register/ to create an account.
Then use:
text
/login/
/
/logout/What to explore
accounts/forms.py- registration formaccounts/views.py- registration and protected application flowaccounts/urls.py- routesapp/models.py- user-owned recordsapp/views.py- filtering records for the logged-in user
The important security lesson is that the server filters data by the authenticated user. Do not rely on hiding links in the browser.
Lesson resources
Supporting code and files from this part of the curriculum.
Finished this lesson?
Keep your place here, or save it across devices with an email link.
Saved in this browser. Save progress with email →