This is a Django project template for Django 4.2 that I use to start new projects.
- Docker, docker-compose
- Pydantic for configs loading
- Configured with uvicorn for async compatibility
- just for shortcuts
- black + ruff for linting
- Simple logging
Prerequisites:
- Install just
- Install docker
- Build the project
just build
- Run the project
just up
- Migrate the database
just migrate
- Create superuser
just django createsuperuser
- Collect static
just django collectstatic
- Done! Go to http://0.0.0.0:8100/admin/ and login with the superuser you created.
just
- list all available shortcuts
Docker shortcuts:
just build
- build the projectjust up
- run the project
Linting shortcuts:
just lint
- lint the project with black and ruffjust black
- just black the projectjust ruff
- just ruff the project
Django shortcuts:
just migrate
- migrate the databasejust mm *app_name* -n *migration_name*
- create a migration for the app_name called migration_namejust django
- run django management commandjust startapp *app_name*
- create a new app called app_name