A very simple settings configurable in Django Admin Panel.
Project description
A very simple settings configurable in Django Admin Panel.
Installation
Install a package.
$ pip install django-simple-settings
Add “simple_settings” to your INSTALLED_APPS setting:
INSTALLED_APPS = (
...
'simple_settings',
)
Add context processor if you would like:
TEMPLATE_CONTEXT_PROCESSORS = (
'...',
'simple_settings.context_processors.simple_settings',
)
Create models:
$ python manage.py migrate
Usage
Settings can be set in Django Admin.
Get settings:
from simple_settings import settings
print settings.get('is_feature_available')
print settings.get['is_feature_available']
Get settings in template:
{{ simple_settings.is_feature_available }}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-simple-settings-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a6ce9f9930b6a82784ff37a4d41ebf06a410f3630db80e2f8039921745a72a8 |
|
MD5 | 4e9587fdd9c45186d336cbd1293ef00c |
|
BLAKE2b-256 | fc6a2a8f7d48ad468b324ff2d9e32cb5dc51c4c76952b3a7d9af0ab9c7fdd5c7 |