From PyCon 2017, given by Kenneth Love
This tutorial assumes Python 3.6. If you're using other versions, you'll have to change strings from f-strings to .format()
calls. Other pieces may not work, either, without editing.
- Download the project and put it somewhere you can find it later
- Create a virtual environment with
python -m venv <venv name>
- Activate your virtual environment
- Install the required packages with
pip install -r requirements.txt
while inside the project's directory - Check out the
start
tag for the project, this is where the tutorial will pick up (git checkout start
) - Run
python manage.py migrate
to apply all migrations - Run
python manage.py createsuperuser
and create your user - Run
python manage.py generate_purchases 20
to add 20 purchases and all related records to your database