Boilerplate project using Django and Django REST Framework. Currently supporting only Python 3.x.
IMPORTANT: Make sure you have Django 2.0 installed on your environment. Docker Compose is used just for development environment. The Dockerfile works without it.
$ django-admin.py startproject \
--template=https://github.com/CheesecakeLabs/django-drf-boilerplate/archive/master.zip \
<project_name> .
$ pip install -r requirements.txt
$ python src/manage.py runserver
$ django-admin.py startproject \
--template=https://github.com/CheesecakeLabs/django-drf-boilerplate/archive/master.zip \
<project_name> .
$ docker-compose up
Check code syntax and style before commit changes.
After initializing git, add flake8 hook.
$ git init
$ python -m flake8 --install-hook git
Set flake8 strict parameter to true, this forces all violations to be fixed before the commit.
$ git config --bool flake8.strict true
Running database on latest PostgreSQL Docker container running in the port 5432
. The connection is defined by the dj-database-url
package. There's a race condition script to avoid running Django before the database goes up.
Let's face it, human memory sucks. Will you remember every detail that involves your project 6 months from now? How about when the pressure is on? A project with good documentation that explains all the facets, interactions and architectural choices means you and your teammates won't have to spend hours trying to figure it out later. You can find a template to get started here.