This website has a development database with test images. Follow the setup instructions below to get it running.
- Clone the repo and go to the site root.
- Create a virtualenv:
python3 -m venv venv
- Activate the virtualenv:
source venv/bin/activate
- Install the requirements:
pip install -r requirements.txt && pip install -r requirements-dev.txt
- Create the database:
./manage.py migrate
- Load the dev database:
./manage.py loaddata dev/fixtures/dev.json
- Load the dev images:
./manage.py load_dev_images
./manage.py runserver 0.0.0.0:8000
- Go to
http://localhost:8000/
Username: admin
Password: test
If you make a change in the dev database that you'd like to maintain, you'll need to generate fixtures. This will also need to be done when you make changes to the models and new migrations.
./manage.py dumpdata --natural-foreign --natural-primary --exclude wagtailsearch > dev/fixtures/dev.json
The following packages are installed in requirements-dev.py
. You will need to setup your editor to use them.
- autopep8
- black
- flake8
- isort
With the virtualenv activated, you can lint HTML files with the following commands:
curlylint --parse-only path/to/template.html
djhtml path/to/template.html