Django Stars Backend Skeleton
Django project template based on cookiecutter.
Project preconfigured with best practices and tools to work from the box with minimal configuration and setup. Fast start achieved by using docker and docker compose.
What's included
- Settings via environment variables with django-environ.
- Celery configuration.
- Django REST Framework configuration + Swagger with drf-spectacular.
- Typical user CRUD APIs.
- Docker support using docker-compose configuration for local development (incl. Postgres, Redis & MailPit for testing emails).
- Requirements management with poetry.
- pytest configuration.
- Code formatting with Black.
- Checking code with Ruff - which includes flake8, isort, bandit, pylint etc.
- Pre-commit hook for running test & linters on each commit.
- Integration with Sentry.
How to use
Prerequisites
Installed cookiecutter and docker
Set up project
Step into directory you want to create project and generate project with cookiecutter:
cd /path/to/directory
cookiecutter https://github.com/django-stars/backend-skeleton
Answer the questions in wizard.
Steps after project setup
Step into directory of your project.
Copy .env
file from example file:
cp ./api/.env.example ./api/.env
Run application:
make compose-up