Django Fullstack Template

This is a cookiecutter-Template for a fullstack Django project.

Requirements

  • Python >= 3.11
  • Poetry >= 1.5.1

Getting started

Cookiecutter

First create a virtual env using poetry and install the required packages with poetry install in the root folder (where this readme file is placed). Then run poetry run cookiecutter . to create a new project from this template. You will be asked to enter some values for the project. After that you have a new django project in the folder you specified.

Backstage

TBD

Included features (deviant from the default django "startproject" output)

  • Poetry for python dependency management
  • Jetbrains PyCharm as IDE
  • Django as fullstack web framework:
    • Additional libraries/apps:
    • Settings:
      • Custom user model (see Django docs). The first migration is already created - if you want to change the user model, you have to delete the migration and create a new one.
      • The pyCharm run configuration for django server uses runserver_plus (feature of django-extensions) instead of runserver (see django-extensions docs). This will automatically restart the server when code changes and also provides a nice interactive debugger.
      • Using ManifestStaticFilesStorage as default staticfiles storage. This will automatically prepend a hash to the filename of each static file and update the references in the templates. This is useful for cache busting.
      • In debug-mode the console.EmailBackend is used as default email backend. This will print all emails to the console instead of sending them.
      • Default language and timezone are set to german and europe/berlin respectively.