Django Project Template

screenshot of Django Project Template

The Django project template I use, for installation with django-admin.

Overview:

This Django project template aims to provide a simple and optimized setup for Django 2.0+ projects. It makes few assumptions and focuses on being useful without being overly complicated. The template is optimized for deployment on Heroku but can also be used with other platforms. It includes various features and dependencies, such as the latest Django version, Poetry packaging tool, django-extensions, ShortUUID, and secure default settings. The template runs under docker-compose by default, with a PostgreSQL and Redis instance, but can also be run outside of docker-compose using SQLite.

Features:

  • Latest Django: Uses the latest version of Django for enhanced functionality and features.
  • Poetry Packaging Tool: Utilizes Poetry, a powerful packaging tool, for easy management of project dependencies.
  • django-extensions: Provides various useful commands and features to enhance Django development.
  • ShortUUID: Includes the ShortUUID library, frequently used for generating unique identifiers.
  • Secure by Default: Implements secure default settings, ensuring that important features only work under proper TLS encryption.
  • Docker-Compose Support: Runs under docker-compose by default, with a PostgreSQL and Redis instance.
  • SQLite Support: Can also run outside of docker-compose using SQLite, enabling usage without Postgres-specific features.
  • Customizable: Allows customization of various settings files, such as ALLOWED_HOSTS and environment variables.

Summary:

This Django project template offers a simplified and optimized setup for Django 2.0+ projects. It avoids making unnecessary assumptions while still providing a useful configuration. The template includes various features such as the latest Django version, Poetry packaging tool, django-extensions, and ShortUUID library. It also ensures secure settings by default and supports both docker-compose with PostgreSQL and Redis, as well as running outside of docker-compose with SQLite. The installation process is straightforward, requiring minimal modifications for customization. Overall, it provides a streamlined foundation for Django projects.