Skip to content

Latest commit

 

History

History
75 lines (53 loc) · 4.46 KB

README.md

File metadata and controls

75 lines (53 loc) · 4.46 KB

Cookiecutter Django

Build Status Documentation Status pre-commit.ci status Code style: black

Updates Join our Discord Code Helpers Badge

Powered by Cookiecutter, Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly.

Features

  • For Django 4.2
  • Works with Python 3.11
  • Renders Django projects with 100% starting test coverage
  • Twitter Bootstrap v5
  • 12-Factor based settings via django-environ
  • Secure by default. We believe in SSL.
  • Optimized development and production settings
  • Comes with custom user model ready to go
  • Optional basic ASGI setup for Websockets
  • Optional custom static build using Gulp or Webpack
  • Send emails via Anymail (using Mailgun by default or Amazon SES if AWS is selected cloud provider, but switchable)
  • Media storage using Amazon S3, Google Cloud Storage, Azure Storage or nginx
  • Docker support using docker-compose for development and production (using Traefik with LetsEncrypt support)
  • Procfile for deploying to Heroku
  • Instructions for deploying to PythonAnywhere
  • Run tests with unittest or pytest
  • Customizable PostgreSQL version
  • Default integration with pre-commit for identifying simple issues before submission to code review

Optional Integrations

These features can be enabled during initial project setup.

  • Serve static files from Amazon S3, Google Cloud Storage, Azure Storage or Whitenoise
  • Configuration for Celery and Flower (the latter in Docker setup only)
  • Integration with Mailpit for local email testing
  • Integration with Sentry for error logging

Constraints

  • Only maintained 3rd party libraries are used.
  • Uses PostgreSQL everywhere: 13 - 15 (MySQL fork also available).
  • Environment variables for configuration (This won't work with Apache/mod_wsgi).

Usage

First, get Cookiecutter. Trust me, it's awesome:

$ pip install "cookiecutter>=1.7.0"

Now run it against this repo:

$ cookiecutter https://github.com/singularit-de/cookiecutter-django

You'll be prompted for some values. Provide them, then a Django project will be created for you.

Now take a look at your repo. Don't forget to carefully look at the generated README. Awesome, right?

For local development, see the following: