generator-django-environ v0.4.0
generator-django-environ

Create a django project with django environ
Installation
First, install Yeoman and generator-django-environ using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-django-environThen generate your new project:
yo django-environProject structure
This project uses django environ to handle the project settings. The project will have 4 settings files:
base.py
base.pyholds the shared configuration.dev.py
dev.pyshould be used during development.test.py
test.pyis used when running the tests withpy.test.prod.py
prod.pyis used as default settings file. It has only one required setting at the moment, theSECRET_KEY
Specifying settings
In order to use the development setttings file, you should set the DJANGO_SETTINGS_MODULE.
You can do this in two ways. one is to set it as an environ variable, the other way is to
create an .env file with the setting.
DJANGO_SETTINGS_MODULE=myapp.settings.devYou can use this file to specify all the other settings:
- DEBUG
- ALLOWED_HOSTS
- SECRET_KEY
License
MIT © Patrick Arminio