Thorgate's Django template
- Separate settings for different environments (local/staging/production)
- Python 3.6 or later
- [SPA] Accessible from port
3000for local development
- Docker / Docker Compose integration
- Automated code-formatting using black and prettier
- py.test and coverage integration
- Deploy helpers, using Fabric
- Media files are stored in a CDN like S3 or Google Cloud Storage
- Out-of-the-box configuration for nginx, gunicorn and logrotate
- Includes PyCharm project config
To use this template, first ensure that you have
After that, you should:
Install the requirements of the project template by running
Activate the virtualenv created by pipenv:
Navigate to the directory where you'd like to create your project:
Create a new project by executing:
It will ask you a few questions, e.g. project's name.
After generation completes, you should deactivate virtual environment for cookiecutter, search for any TODOs in the code and make appropriate changes where needed.
See README.md in the generated project for instructions on how to set up your development environment.
Upgrading project template
First ensure you have a python3 interpreter with
To upgrade an existing project, change the current working directory to the root of the project you want to upgrade. i.e.
cd project-to-upgrade. Ensure your are not in the
This will make a commit to the branch
template in your project with the updates to the project template. Then merge the
The template uses our own images for CI runs. One for the template itself and a second one for generated projects. Both images are alpine based and contain python3, pip and some support packages. The images are published to repository container registry and also to docker hub.
The images are built in CI (from default branches only) and also updated every day via schedules.
Project CI Image
- Image in repository registry:
- Image in docker hub:
Template CI Image: