This is a cookiecutter-Template for a fullstack Django project.
- Python >= 3.11
- Poetry >= 1.5.1
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.
TBD
- Poetry for python dependency management
- Jetbrains PyCharm as IDE
- Django as fullstack web framework:
- Additional libraries/apps:
- Django admin site: an automatic admin interface for your models
- django-import-export: importing and exporting data (with admin integration!)
- whitenoise: serving static files directly from within the WSGI application
- django-environ: set all django settings through environment variables (see 12factor)
- python-dotenv: easy loading of environment variables from a
.env
file - django-extensions: utilities for django development (shell_plus, show_urls, ...)
- 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 ofrunserver
(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.
- Additional libraries/apps: