Utilities for Django settings secrets
Project description.
Usage
In your settings.py add something like the following:
from djset import secret as s s.prompt = DEBUG SECRET_KEY = s.get('SECRET_KEY')
The key is resolved in the following order:
environment | keychain in the NAME.keyring namespace (local) | keychain in the KEY.keyring namespace (global) | prompt for input or raise ImproperlyConfigured
Prompt will also add the key to your keyring. prompt=False will still raise an ImproperlyConfigured error which is more useful for an automated deployment. An additional optional argument prompt_help can help the user make a decision. This might be useful if you are distributing a project template for others to use.
By default the NAME in the namespace is your DJANGO_SETTINGS_MODULE. To use an alternate>
Advanced
Requires Nose2 for tests. Repository and issues at
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.