Skip to content

A template with many features of Docker, 3rd party login, JWT, websocket, Admin UI and django-q

Notifications You must be signed in to change notification settings

NatLee/django-project-template

Repository files navigation

Django Backend Template

cover

This is a Django backend template. It includes some useful features and tools.

Requirements

Please specify the required variables in .env for this project.

Features

  • Docker
  • Backend -> Django 5
  • Database -> MariaDB
  • Load Balancer -> NGINX

Other Features

  • API Proxy -> api_proxy
  • User login history -> django_login_history
  • Login Playground (Session, JWT) -> dev_dashboard
  • 3rd Party Login with JWT -> Custom Allauth Adapter (authentication)
  • Websocket(WSGI) -> Django Channels
  • Async Task -> Django Q2
  • Admin Page -> Django Unfold
  • Documentation -> Redoc, Swagger

Usage

Quick Start

docker-compose build && docker-compose up

Rebuild

Clean up and rebuild.

rm -rf backend-sql-data &&  docker-compose down -v && docker-compose build && docker-compose up

3rd Party Login

You can check the setting in here.

Misc

  • Create superuser
bash dev-create-superuser.sh
  • Enter Shell
bash dev-shell.sh
  • Start New APP
bash dev-startapp <YOUR_NEW_APP_NAME>

Playground

The playground is a place to test the login system and websocket.

Link

Here's port 5566 is an example. You can define it in .env file.