Django Webpack App

screenshot of Django Webpack App

Cookiecutter template for a modern Django app - with webpack for js, drf, optional Redis as cache and automatic "dockerization"

Overview

This is a template for a modern Django app that generates a foundation for a Django app with Django Rest Framework and some utilities. It also has the option to add Redis for storage and session cache. The template uses poetry for dependency resolution and includes a configured webpack.config.js file for writing front-end code and serving it as a static file within Django templates. It automatically adds Dockerfiles and a docker-compose.yml file for easy setup and includes a simple nginx config for routing requests to Django and serving static files. The template uses PostgreSQL as the default storage option but can be changed to any other SQL database.

Features

  • Django app foundation: Generates a foundation for a Django app with Django Rest Framework and some utilities.
  • Optional Redis support: Can optionally add Redis for storage and session cache.
  • Poetry integration: Uses poetry for dependency resolution.
  • Webpack integration: Includes a configured webpack.config.js file for writing front-end code and serving it as a static file within Django templates.
  • Dockerization: Automatically adds Dockerfiles and a docker-compose.yml file for easy setup of all services.
  • Nginx configuration: Generates a simple nginx config for routing requests to Django and serving static files.
  • PostgreSQL support: Uses PostgreSQL as the default storage option but can be changed to any other SQL database after generation.

Summary

The modern Django app template provides a solid foundation for building Django apps with Django Rest Framework and front-end code integration using webpack. It also includes Dockerfiles and a docker-compose.yml file for easy setup and a simple nginx config for routing requests and serving static files. This template is opinionated but can be customized to fit specific project requirements.