Ultimate Django3.2 Template for starting any project from not zero!

Overview

Ultimate Django3.2 Template

Just a big starting point for any backend project

python django docker travisci postgresql nginx git

Build Status Code Style Black

Guideline

Goal

This project main goal is to provide a way to deploy django applications by using docker along with nginx, gunicorn and letsencrypt and much more features a backed developer needs.

Repo Features

  • Latest LTS Django3.2
  • Latest LTS included 3.2.x and needed requirements

  • Git
  • python gitignore and README with license

  • Docker File
  • Latest Python image dockerfile prod/dev and dockerignore

  • Docker Compose
  • Docker compose prod/dev and minimum setup for django and db included,with volumes and network

  • Nginx + Gunicorn
  • included nginx setup with gunicorn as serving service and file configs for production

  • Django env
  • enviroment sample file and setup

  • Hints and Files
  • Sample files and hints all over the template for giving more pace

  • Black
  • Reformating your codes to standard projects

  • Travis and Flake8
  • Included with travis.yml configuration file for test purposes.plus included Flake8 and config files.

  • Preconfigured
  • Preconfigured settings.py for email,db,static,media etc.

Configurations

  • Static & Media Directories
  • STATIC_ROOT and STATIC_URL and same for media configurations with STATICFILES_DIRS

  • Template Directories
  • Genral templates directory for root

  • Site Framework and Sitemaps + robots
  • Siteframework as in site_id configs with robots.txt and sample sitemaps

  • Database Configs
  • Database configuration for production with postgresql and volume directory in data

  • Email Configs
  • Email configurations for dev and prod as in env file

  • Message Configs
  • Message and warnings configuration for notification handelings

  • Hints and Files
  • Sample files and hints all over the template for more giving more pace

  • TestCase
  • Hints for TestCases and sample files for an app

  • Security
  • Security tags for https and redirections,HSTS,Cookie and other headers

Development usage

You'll need to have Docker installed. It's available on Windows, macOS and most distros of Linux.

If you're using Windows, it will be expected that you're following along inside of WSL or WSL 2.

That's because we're going to be running shell commands. You can always modify these commands for PowerShell if you want.

Clone this repo anywhere you want and move into the directory:

git clone https://github.com/AliBigdeli/Ultimate-Django3.2-Template.git

Enviroment Varibales are included in docker-compose.yml file for debugging mode and you are free to change commands inside:

services:
  app:
    command: sh -c "python manage.py makemigrations && python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
    environment:      
      - DEBUG=1

Build everything:

The first time you run this it's going to take 5-10 minutes depending on your internet connection speed and computer's hardware specs. That's because it's going to download a few Docker images and build the Python + requirements dependencies.

docker-compose up --build

Now that everything is built and running we can treat it like any other Django app.

Note:

If you receive an error about a port being in use? Chances are it's because something on your machine is already running on port 8000. then you have to change the docker-compose.yml file according to your needs.

Check it out in a browser:

Visit http://localhost:8000 in your favorite browser.

Testing Usage

running all at the same time:

docker-compose run --rm app sh -c " black -l 79 && flake8 && python manage.py test" -v core:/app

Production usage

License

MIT.

Todo

  • fix production composefile
  • connect repo to travis ci
  • add development usage doc
  • add test usage doc
  • add encryptions
  • add production usage doc

Bugs

Feel free to let me know if something needs to be fixed. or even any features seems to be needed in this repo.

Owner
TheAliBigdeli
I am Ali Bigdeli, my passion for development took me from networking manager to python programming and AI plus IOT contributer.
TheAliBigdeli
Code Kata Python Template

Code Kata Python Template This is the code kata template for python created by Aula de Software Libre de la Universidad de Córdoba Step 1. Use this re

Sergio Gómez 2 Nov 30, 2021
Bleeding edge django template focused on code quality and security.

wemake-django-template Bleeding edge django2.2 template focused on code quality and security. Purpose This project is used to scaffold a django projec

wemake.services 1.6k Jan 04, 2023
A low dependency and really simple to start project template for Python Projects.

Python Project Template A low dependency and really simple to start project template for Python Projects. HOW TO USE THIS TEMPLATE DO NOT FORK this is

Yurii Dubinka 5 Jan 21, 2022
A Django project skeleton that is modern and cutting edge.

{% comment "This comment section will be deleted in the generated project" %} Edge A Fantastic Django project starter. Features Ready Bootstrap-themed

Arun Ravindran 827 Dec 15, 2022
NHS Theme for Streamlit applications

NHS Streamlit App Template Deployment (local) The tool has been built using Stre

nhs.pycom 3 Nov 07, 2022
Django Webpack starter template for using Webpack 5 with Django 3.1 & Bootstrap 4. Yes, it can hot-reload.

Django Webpack Starter Hello fellow human. The repo uses Python 3.9.* Django 3.1.* Webpack 5.4.* Bootstrap 4.5.* Pipenv If you have any questions twe

Ganesh Khade 56 Nov 28, 2022
Starter project for python based lambda project.

Serverless Python Starter Starter project for python based lambda project. Features FastAPI - Frontend dev with Hot Reload API Gateway Integration (+r

4 Feb 22, 2022
Flask Boilerplate - Material Kit Design | AppSeed

Flask Boilerplate - Material Kit Design | AppSeed

App Generator 45 Nov 18, 2022
A Django starter template with a sound foundation.

SOS Django Template SOS Django Tempalate is a Django starter template that has opinionated and good solutions while starting your new Django project.

Eray Erdin 19 Oct 30, 2022
A template repo for use in the Advent of Code

AoC-Template A template repo for use in the Advent of Code The README_template.md must contain "STATS_TABLE" to be replaced by the generated table, an

0 Jan 14, 2022
A template repository implementing HTML5 Boilerplate 8.0 in Sanic using the Domonic framework.

sanic-domonic-h5bp A template repository implementing HTML5 Boilerplate 8.0 in Sanic using the Domonic framework. If you need frontend interactivity,

PyXY 3 Dec 12, 2022
Template for creating ds simple projects

ds-project-template Template for creating ds simple projects Requirements pyenv python==3.9.4 Setup For this purpose you use following commands: pytho

1 Dec 17, 2021
Cookiecutter Flask OpenAPI is a template for jumpstarting production-ready Flask projects quickly.

Cookiecutter Flask OpenAPI is a template for jumpstarting production-ready Flask projects quickly. It has a well organized and scalable structure. It uses API design first

Roger Camargo 3 Nov 17, 2022
Combine the power of FastAPI and Django to build a production-ready application capable of utilizing all of the best features of both worlds.

FastAPI and Django Combo This projects aims to combine FastAPI and Django to build a Production ready application capable of utilizing all of the feat

Nsikak Imoh 33 Dec 27, 2022
A framework for launching new Django Rest Framework projects quickly.

DRFx A framework for launching new Django Rest Framework projects quickly. Comes with a custom user model, login/logout/signup, social authentication

William Vincent 400 Dec 29, 2022
Boilerplate code for a Python Flask API

MrMat :: Python :: API :: Flask Boilerplate code for a Python Flask API This variant of a Python Flask API is code-first and using native Flask Featur

0 Dec 26, 2021
Bleeding edge django template focused on code quality and security.

wemake-django-template Bleeding edge django2.2 template focused on code quality and security. Purpose This project is used to scaffold a django projec

wemake.services 1.6k Jan 08, 2023
Project template layout for Django 3.0+

Django 3.0+ project template This is a simple Django 3.0+ project template with my preferred setup. Most Django project templates make way too many as

José Padilla 649 Dec 30, 2022
A template for some new Python tool or package with a reasonable basic setup.

python-app-template A template with a reasonable basic setup, including: black (formatting) flake8 (linting) mypy (type checking) isort (import sortin

Anton Pirogov 3 Jul 19, 2022
Django sample app with users including social auth via Django-AllAuth

demo-allauth-bootstrap Simple, out-of-the-box Django all-auth demo app A "brochure" or visitor (no login required) area A members-only (login required

Andrew E 215 Dec 20, 2022