Cookiecutter Django

Django Api Cookiecutter

Powered by Maicol with the goal of optimize our development processes, we are happy to introduce our Django projects boilerplate packed and ready to use with the following features:

  • Python 3.8
  • Django 3.0.6
  • Django REST Framework 3.11.0
  • 12 Factor based settings
  • PostgreSQL as database engine
  • Docker as container engine
  • Run tests with unittest or pytest
  • django-allauth 0.41.0

Installation

  1. First, get Cookiecutter. Trust me, it's awesome:

    $ pip install cookiecutter
  2. Run against this repo

    $ cookiecutter https://github.com/mcra02/cookiecutter-django-api.git

    You'll be prompted for some values. Provide them, then a Django project will be created for you.

  3. Enter the project and take a look around:

    $ cd project/
    $ ls

Development

  1. Migration generated

    $ python manage.py makemigrations
  2. Migration database

    $ python manage.py migrate
  3. Run development

    $ python manage.py runserver 0.0.0.0:8000

Production

  1. Build dockerfile

    $ docker build -t "project_name" .
  2. Migration database

    $ docker run -itd --name backend-osffni -p 3000:8000 project_name

Contributing

Please fill free to submit pull requests as well as open issues.