A Cookiecutter template for creating Django projects with Celery, Celery Beat, Django Ninja for APIs, and Docker support.
- Django {{ django_version | default('5.0') }}: The core web framework.
- Django Ninja: Fast, async-ready API framework with type hints.
- Celery & Celery Beat: Asynchronous task processing and periodic tasks.
- PostgreSQL: Default database.
- Redis: Default Celery broker and result backend.
- Docker & Docker Compose: For containerized development and deployment setup.
- Environment Variables: Settings managed via
.env
file usingpython-decouple
. - Basic Settings Structure: Separate settings for
local
andproduction
. - Gunicorn: Production WSGI server.
- Whitenoise: Simplified static file serving for production (optional).
- Python 3.8+
- Cookiecutter:
pip install cookiecutter
- Docker & Docker Compose (if using the Docker setup
use_docker=y
)
Generate your project using Cookiecutter:
cookiecutter gh:your-github-username/cookiecutter-django-celery-ninja
Or from a local clone:
cookiecutter /path/to/cookiecutter-django-celery-ninja
You will be prompted for configuration values (like project name, author, database settings, etc.). See cookiecutter.json
for details.
After generating the project, navigate to the project directory (cd your_project_slug
) and follow the instructions in the generated project's README.md
.
Contributions are welcome! Please feel free to submit a pull request or open an issue.