Django Project Template

screenshot of Django Project Template
django

Project template layout for Django 3.0+

Overview:

This article discusses a simple Django 3.0+ project template that aims to provide a useful setup while making minimal assumptions. The template is optimized for deployment on Heroku but can also be deployed on other servers. It includes features such as using Pipenv for Python packaging, different settings for development, staging, and production environments, debugging tools, custom extensions, HTTPS and security settings, PostgreSQL database support, and deployment options.

Features:

  • Django 3.0+: Built on the latest version of Django for enhanced functionality.
  • Pipenv: Uses Pipenv, the officially recommended Python packaging tool from Python.org.
  • Development, Staging, and Production settings: Provides different settings for different environments using django-configurations.
  • Value insight and debug information: Includes django-debug-toolbar for obtaining value insight and debug information during development.
  • Custom extensions: Offers a collection of custom extensions with django-extensions.
  • HTTPS and security settings: Implements HTTPS and other security-related settings for staging and production environments.
  • Procfile for running gunicorn: Includes a Procfile for running gunicorn with New Relic's Python agent.
  • PostgreSQL database support: Supports PostgreSQL database using the psycopg2 library.

Summary:

This article introduces a Django 3.0+ project template that offers a simple and customizable setup for Django projects. It includes various features such as Pipenv for Python packaging, different environment settings, debugging tools, custom extensions, HTTPS and security settings, PostgreSQL database support, and deployment options. The installation guide provides step-by-step instructions for setting up the template in a virtual environment and deploying it to Heroku or other servers.

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.