Django Hatch Startproject

screenshot of Django Hatch Startproject
django

Django startproject template that uses hatch for project management.

Overview:

The Django Hatch Startproject is a starter template for creating a fresh Django project. Inspired by Jeff Triplett's django-startproject and Carlton Gibson's Post The Single Folder Django Project Layout, this template includes various batteries that are commonly used in Django projects. The template follows the single folder layout approach, making it easy to split the project into several apps later if needed. By default, SQLite is configured, but MySQL or Postgres support can be activated by making a simple configuration change in the pyproject.toml file.

Features:

  • Django 4.2.x: Latest version of Django framework.
  • django-browser-reload: Automatically reloads the browser during development when changes are made to the code.
  • django-environd: Simplifies environment variable management in Django.
  • django-htmxd: A local installation of htmx library for enhanced interactivity.
  • django-tailwind-cli: Integrates the Tailwind CSS framework with Django.
  • whitenoise: Configures SQLite with WAL mode enabled.
  • Argon2 password hashing: Activates Argon2 password hashing for enhanced security.
  • Development tools: Includes various development tools such as django-types, model-bakery, pytest, pytest-cov, pytest-django, pytest-mock, and pre-commit setup inspired by Boost your Django DX.
  • sane ruff configurations: Configurations for enhancing development workflow.
  • syrupy: Snapshot testing tool for Django.

Summary:

The Django Hatch Startproject provides a convenient starting point for creating Django projects. It includes various features and tools commonly used in Django development, such as browser reload, environment variable management, enhanced interactivity with htmx, integration with the Tailwind CSS framework, and more. The template follows a single folder layout, allowing for easy app splitting in the future. With the ability to activate MySQL or Postgres support and its collection of development tools, the Django Hatch Startproject offers a solid foundation for building robust and efficient Django applications. Contributions, issues, and feature requests are welcome from the community.

django
Django

Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. It follows the model-view-controller (MVC) architectural pattern, providing an extensive set of built-in tools and conventions to streamline the creation of robust and scalable web applications.

template
Templates & Themes

A template or theme refers to a pre-designed layout or structure that provides a basic framework for building a specific type of application or website. It typically includes good design, placeholder content and functional features, allowing developers to customize and fill in the details according to their specific needs.