Bud

screenshot of Bud

A Django project template with automation

Overview:

This article is about a Django project template that is heavily inspired by Cookiecutter's Django template. The template provides several features to manage the development environment, ensure code quality, type-checking, and formatting, as well as following the 12-factor-app guidelines. It also utilizes PostgreSQL for the database, Redis for caching, and browser_app for project-specific code organization.

Features:

  • Development environment management: The template uses docker-compose to manage the development environment efficiently.
  • Code quality assurance: The template utilizes pre-commit to prevent the commitment of unfit code.
  • Type-checking: The template incorporates mypy for type-checking, ensuring code reliability.
  • Code formatting: The template uses black to automatically format the code, maintaining consistent style throughout the project.
  • Consistent editing experience: EditorConfig is used to provide a consistent editing experience across different editors and IDEs.
  • 12-factor-app guidelines: The template follows the 12-factor-app guidelines by using django-configurations and allowing settings to be overridden with environment variables.
  • Database management: PostgreSQL is used as the database for the project.
  • Caching: Redis is used for caching data, improving the performance of the application.
  • Project-specific code organization: The template utilizes browser_app for project-specific code, eliminating the need for global static and templates directories.

Summary:

This article introduces a Django project template that is inspired by Cookiecutter's Django template. It provides various features such as development environment management with docker-compose, code quality assurance with pre-commit, type-checking with mypy, code formatting with black, and consistent editing experience with EditorConfig. The template follows the 12-factor-app guidelines, uses PostgreSQL as the database, Redis for caching, and browser_app for project-specific code organization, eliminating the need for global static and templates directories. The installation guide provides step-by-step instructions to set up the template and start the development server.