N.B. This Django project is configured to log all SQL statements executed by the ORM to the console.
This demo uses Postgres as a database -- make sure you have Postgres running.
- Checkout this repo:
git clone https://github.com/samueljsb/workshop-orm
cd workshop-orm
- Create and activate virtual environment and install the requirements:
python -m venv venv
. venv/bin/activate
python -m pip install -rrequirements.txt
- Create the database and run the migrations:
createdb workshop_orm
python -m manage migrate
- Populate the sample data:
python -m manage populate_data