Template design for django LTS projects.
Create a virtualenv and install django with the desired version.
python -m venv .venv
source .venv/bin/activate
pip install django==<VERSION>
Note: The
<VERSION>
of django must be LTS and must be the same as the branch you chose.
After installing django you have available the django-admin
utility that you use to start your project based on the template.
django-admin startproject -v2 --template https://github.com/beatsolu/django-templates/archive/<VERSAO>.zip --extension py,yml,json,md,example,cfg --name Dockerfile,Makefile,Procfile myproject
Follow the instructions in the README of the generated project.
Note: The
<VERSION>
in the url is the name of the branch of the installed django version. e.g.v2.2
.
make
To list all available commands
make setup
This command is the starting point for the configurations of the project under development. It creates a virtualenv to run some commands locally, copies the file .env.example
to .development
, creates the docker image, executes the migrations in a postgres database, installs the development dependencies and starts the project .
make pre-commit
This command is used automatically by pre-commit-hook
.
These are the libraries used in the project.
A helper for organizing Django project settings by relying on well established programming patterns.
With a couple of lines of config WhiteNoise allows your web app to serve its own static files, making it a self-contained unit that can be deployed anywhere without relying on nginx, Amazon S3 or any other external service.
isort is a Python utility / library to sort imports alphabetically, and automatically separated into sections and by type.
A tool that automatically formats Python code to conform to the PEP 8 style guide.
Removes unused imports and unused variables as reported by pyflakes
Tool for style guide enforcement.
Coverage plugin for pytest.
A Django plugin for pytest.
Factoryboy integration the pytest runner
A small script to generate coverage badges using coverage.
Lint commit messages
Git hooks made easy
Automate versioning and CHANGELOG generation, with semver.org and conventionalcommits.org
When you commit with Commitizen, you'll be prompted to fill out any required commit fields at commit time.
It is pre-configured to deploy on heroku and aws Elastic Beanstalk docker platform.
Configured with django rest framework with the /users/
endpoint available. Self-generated documentation is also available with swagger-ui
and openapi schema
accessible in the url /docs
.