Giter Club home page Giter Club logo

django-init's Introduction

django-init

django-init is a Django 3 starting template that allows you to kickstart a project without setup hassle and complexity, while maintaining a best practice project structure with up to date dependencies.

Package contains

  • Django 3 (Django>=3.0)
  • Python (python:3.8-slim)
  • MariaDB server/client (mariadb:10.5-focal)
  • sqlite3 (default, see settings.py)
  • netcat as a dependency of wait-for
  • requirements.txt

Features

  • Custom default User (Django 3 implementation)
  • .env file support (https://github.com/joke2k/django-environ)
  • The username is the email address (How do you like this?)
  • Preconfigured settings for SMTP, MySQL, sqlite3, caching, ...
  • i18n enabled and substituted datetime.now() by timezone.now()
  • "hello world" view and template

Installation

This template is preconfigured to work with docker-compose out of the box (see docker-compose.yml). For best performance, the executed code is mounted host authoritive (cached) while the MySQL data files are mounted container authoritive (delegated).

$ git clone https://github.com/flowl/django-init
$ cd django-init/
$ make build

Copy the .env.dist file to .env and set a random token for SECRET_KEY.

Apply initial migrations:

$ make migrate

Create a superuser and the cache table:

$ make cachetable
$ make superuser

Start:

$ make start
$ make log

Visit http://localhost:8070.

If you have traefik installed, you can also go to http://djangoinit.localhost straight.

The admin url is http://djangoinit.localhost/en/admin/

Settings

Please edit apps/Application/settings.py and .env respectively:

  • SECRET_KEY, AUTH_PASSWORD_VALIDATORS
  • DEBUG, ALLOWED_HOSTS
  • DATABASES (MySQL container and sqlite3)
  • CACHES (using MySQL)
  • EMAIL_BACKEND and SMTP settings

Hints

See the Makefile for available commands.


https://github.com/flowl/django-init

Maintained by Daniel Wendler.

Distributed under the MIT License.

django-init's People

Contributors

flowl avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.