Welcome to Django template’s documentation!

django-template is a project template based on Django and Django Rest Framework with Docker. Everything what you will need for develop included here.

5 minutes and you will be ready for develop new projects!

Features:

  1. Based on Python 3.9 (will be updated to 3.10 soon)

  2. Docker-compose environment

  3. Celery integration

  4. Postgres and Redis integrations

  5. Nginx and support SSL (TLS) certificates for https connections (Support http2 protocol)

  6. CI/CD integrations for Github and Gitlab repositories.

  7. Swagger “out-of-box” for OpenApi

And a lot of another features wait for you!

Quick start!

This guide helps to install and run new projects.

Requirements

  • Docker with docker-compose

Usage

# Clone the repository

$ git clone https://github.com/bandirom/django-template.git ./project_name

Before start let’s set up superuser email and password (not username)

Open the project in your favorite IDE and edit docker/prod/env/.data.env file.

Set up variables for superuser:

SUPERUSER_EMAIL=example@email.com
SUPERUSER_PASSWORD=secretpassword
PROJECT_TITLE=MyProject

Run the local project with command:

$ docker-compose up -d --build

Note

You can run project without -d (detach) flag, if you don’t need to run server everytime

Note

Project will bind 8000 port on your machine. If you wanna change it, you can do it in docker-compose.yml in service web

Let’s check the logs of containers (Only if you use (-d) flag):

$ docker-compose logs -f

And visit http://localhost:8000.

ChangeLog

1.0.0

  • docker and docker-compose support.

MailHog

MailHog

What is it?

Here

Nginx

Info about nginx

Certbot

Here

GitHub Actions

What is it?

Hello

GitLab

What is it?

Hello

Decorators

Except shell

Decorator ‘except_shell’

Utils

Find dict in list

do something

Another utils

here another include

Indices and tables