The Django sample polls application, from Writing your first Django app for Django version 2.2.
Create a Python 3 virtual environment, and activate it.
$ python3 -m venv env
$ source env/bin/activate
Install requirements.
(env)$ python -m pip install -r requirements.txt
Run migrations, and load initial data from fixtures.
(env)$ python manage.py migrate
(env)$ python manage.py loaddata polls/fixtures/initial_data.json
Note: the admin username is admin, password is [email protected]
Settings are automatically picked up from a .env
file in the root directory if one is present.
Otherwise, the DATABASE_URL
environment variable will be used to configure the database to connect to.