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 1 - Give Your Application a Database
This project makes database persistence explicit.
Run
bash
python -m pip install -r requirements.txt
python manage.py migrate
python manage.py runserverOpen the local URL shown by Django.
What to inspect
inventory/models.py- Django modelinventory/admin.py- admin registrationinventory/management/commands/seed_products.py- sample datadb.sqlite3- local database created by Django
The application demonstrates the relationship:
text
Django Model
↓
Database Table
↓
Stored RowsThe next project will use SQL to inspect this database directly.
Lesson resources
Supporting code and files from this part of the curriculum.