Make your django local_settings play nice with Heroku
Project description
Provides crosswalk between a Foreman-style .env file and your django local settings.
Installation & Usage
Add to your django project’s requirements.txt:
herokal-settings
Add herokal to INSTALLED_APPS
Install the heroku-config plugin:
heroku plugins:install git://github.com/ddolar/heroku-config.git
Run the management command to export your local_settings.py:
./manage.py exportenv
At the bottom of your settings.py, instead of:
from local_settings import *
Use herokal.settings:
from herokal.settings import *
Now, when you run ./manage.py runserver, your local_settings.py will be loaded, but when you run foreman start, your .env will be used.
Options
The exportenv command takes a few optional flags:
--settings-module The name of the settings module to export. Default is 'local_settings' --include-databases Whether or not to serialize database connections into the .env file. Default is false --outfile The name of the file to export your local settings to. Default is '.env'
Changelog
0.0.1
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file herokal-settings-0.0.1.tar.gz
.
File metadata
- Download URL: herokal-settings-0.0.1.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f244378d28d641928662257fa34e8cb4f4462790e74817195c820150b782f10 |
|
MD5 | 5b270416c31903ab95f91a0e8fa6e6ba |
|
BLAKE2b-256 | 9e2bcab7990cde7d0ac99af5ac092e58072d6c94004b87eb12ad544153f5010c |
File details
Details for the file herokal_settings-0.0.1-py2.7.egg
.
File metadata
- Download URL: herokal_settings-0.0.1-py2.7.egg
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbb8a9d5793a476a1a8fe8f1ff093e96f2eb228f8f7e8dbd17114c6857c06695 |
|
MD5 | 937df818b9318d94c85a3f837e03a136 |
|
BLAKE2b-256 | f1a2da4d4514c5782a65ed3e6a2dcfef8cc24fb4dee72241260d41e6ef49948c |