Models

A model is a table

Every PawWalk walker needs to live somewhere between requests โ€” right now walker_list in views.py just returns a hardcoded Python list, and it forgets everything the moment the server restarts. Django's fix is a model: a Python class that describes a database table, one attribute per column.

This is the first database of the whole course. Django ships with SQLite already wired up in settings.py โ€” a single file on disk, zero setup, perfect for learning. The real PawWalk backend talks to Postgres instead, but the swap is a few lines in settings.py; the model code you're about to write barely changes.