Simple Django Boilerplate

screenshot of Simple Django Boilerplate

A minimal Django (2.xx) setup for creating new applications.

Overview

The Simple Django Boilerplate is a project template that offers some key differences from the traditional Django tutorial for creating a new project. It provides a simplified project structure, multiple settings files, a custom user model, environment variable integration, a core app for management tasks, and a public folder for static and media files. The boilerplate also includes some miscellaneous files such as editorconfig, eslint, and gitignore setting files.

Features

  • Simplified project structure: The boilerplate avoids unnecessary nesting by having a project folder inside the project folder, unlike the traditional Django tutorial structure.
  • Multiple settings files: Instead of having a single settings file, the boilerplate includes separate settings files for development, staging, and production environments.
  • Custom user model: The boilerplate encourages the use of a custom user model, as suggested by the latest Django documentation.
  • Environment variable integration: The boilerplate provides support for loading environment variables using tools like python-dotenv.
  • Core app for management tasks: The boilerplate includes a core app that houses project-specific functionality and common management tasks.
  • Public folder for static and media files: The boilerplate has a dedicated public folder where static files and media files can be stored. It is recommended to include this folder in .gitignore to avoid overwriting uploaded images in production.
  • Miscellaneous files: The boilerplate includes editorconfig, eslint, and gitignore setting files for convenience, but they can be edited or removed based on individual preferences.

Summary

The Simple Django Boilerplate provides a simplified and optimized approach for creating new Django projects. It offers a streamlined project structure, customizable settings files, environment variable integration, and a dedicated folder for static and media files. By using this boilerplate, developers can save time and follow best practices recommended by the Django documentation.