Skip to content

PavelLopatin/django-ninja-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django-Ninja Template

Environment

Copy .env.example to .env and adjust values.

  • Required: SECRET_KEY, DEBUG, CSRF_TRUSTED_ORIGINS, CORS_ALLOWED_ORIGINS, ALLOWED_HOSTS, CORS_ORIGIN_ALLOW_ALL, DB_NAME, DB_USER, DB_PASS, DB_HOST, DB_PORT,

How to use

To run: docker compose --env-file .env -f docker/compose.yaml up -d

Site available on 8000 port.

You can make any changes in code, they will appear automatically. If you want to execute something with manage.py use:

docker compose --env-file .env -f docker/compose.yaml exec app python3 manage.py migrate
docker compose --env-file .env -f docker/compose.yaml exec app python3 manage.py makemigrations
docker compose --env-file .env -f docker/compose.yaml exec app python3 manage.py createsuperuser

Health and docs

  • OpenAPI (if web app enabled): /api/docs
  • Standard Django Admin site for database management: /django/admin

About

Django-Ninja backend template with Docker support, PostgreSQL, environment-based configuration, and ready-to-use API docs. Ideal for fast API development and production-ready setups.

Topics

Resources

Stars

Watchers

Forks

Contributors