/hello_django_api

My template for Django API projects (work in progress!)

Primary LanguageDockerfileMIT LicenseMIT

hello_django_api

My template for Django API projects using Django Rest Framework
and Postgres all running under Docker.

Setting up a new project

Copy all these files into your new project folder

Make the main project app directory

mkdir app

Build the web service.

docker-compose build web

Create the main project app

docker-compose run --rm web sh -c "/py/bin/django-admin startproject app ."

Run the flake8 linter

docker-compose run --rm web sh -c "flake8"; docker-compose down

Run unit tests

docker-compose run --rm web sh -c "python manage.py test"; docker-compose down