- 🧪 Fully tested with Pytest.
- 🚀 Enjoy the latest version of Django (5+) with all its features and improvements.
- 🛠️ Django Rest Framework for building APIs.
- 💿 Start your project with PostgreSQL without the need to install and configure it.
- 📦 Redis caching out of the box.
- 🔒 Login, Logout, Logout all, User profile and creation with Knox, an easy-to-use authentication for DRF.
- 🙋 Extended user model and a custom manager. Start with the email as the unique identifier.
- 🗄️ A custom BaseModel to easily add
created_at
andupdated_at
fields to your models. - 🗑️ A custom SoftDeleteBaseModel to add soft delete functionality to the models you choose to.
- ⏳ Fully configured asynchronous tasks with Celery. It also includes a reusable BaseTaskWithRetry.
- 🗃️ django_celery_results enables Celery to store task results using Django's database backend.
- 📅 django_celery_beat for periodic task scheduling using the Django admin interface.
- 🔽 django-filter add support for complex filtering of querysets in Django and DRF views.
- 📖 Auto document your API with drf-spectacular and Swagger.
- ⚡Test your queries and code interactively with Jupyter Notebooks.
- 🐞 Django Debug Toolbar for debugging and profiling.
- 🧩 Django Extensions for custom management commands and model enhancements.
- 🔧 Get out of the box code formatting with Black, linting with Flake8 and test with Pytest.
- 👨💻 Develop with VS Code and Dev Containers.
- 💻 VS Code
- 🐋 Docker
- 🐳 Docker Compose
- Clone the repo or use it as a template to start a new project.
- Open the project in VS Code.
- If you installed the recommended extensions, open
Todo Tree
in the sidebar. It will guide you trough the first steps setting up your project, like changing the name of the container, adjusting your URLS, etc. ⚠️ Useenv.example
to create a.env
file.- Hit
CTL/CMD + Shift + p
and selectReopen in container
. This will:- Create a dev container.
- Setup a Redis server.
- Setup your PostgreSQL database.
- Install the dependencies.
- Migrate the database.
- Create your super user with
python manage.py createsuperuser
. - Run the project with
python manage.py reserver
. - Work as usual.
This template comes with some shortcuts so you don't have to memorize how to start the workers:
poetry run worker
: to start a new Celery worker.poetry run beat
: to start your periodic tasks.
You can also use:
poetry run server
instead ofpython manage.py runserver
poetry run makemigrations
instead ofpython manage.py makemigrations
poetry run migrate
instead ofpython manage.py migrate
- Index Page with a link to the Django admin
- OpenAPI 3 schema generation and Swagger.
- CI with Github Actions
- Add method to restore soft deleted data
- Email sending with celery
- Data seeding
- API Versioning
- Production Docker file
- Production Docker compose file
- CD with Github Actions