Make Applications Real•Reading lesson•Free
Overview
No account is required. Learn the material, try the examples, and mark it complete locally when you are ready to move on.
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.