easily manage typed extra settings using the django admin.
Project description
django-extra-settings
config and manage extra settings using just the django admin.
Installation
- Run
pip install django-extra-settings
- Add
extra_settings
tosettings.INSTALLED_APPS
- Run
python manage.py migrate
- Run
python manage.py collectstatic
- Restart your application server
Configuration (optional)
Settings
All these settings are optional, if not defined in settings.py
the default values (listed below) will be used.
# if True the template tag will fallback to django.conf.settings,
# very useful to retrieve conf settings such as DEBUG.
EXTRA_SETTINGS_FALLBACK_TO_CONF_SETTINGS = True
# the upload_to path value of settings of type 'file'
EXTRA_SETTINGS_FILE_UPLOAD_TO = 'files'
# the upload_to path value of settings of type 'image'
EXTRA_SETTINGS_IMAGE_UPLOAD_TO = 'images'
Usage
Just create and edit your extra settings using the admin.
Templates
{% load extra_settings %}
{% get_setting 'SETTING_NAME' default='django-extra-settings' %}
Testing
# create python 3.7 virtual environment
virtualenv testing_django_extra_settings -p "python3.7" --no-site-packages
# activate virtualenv
cd testing_django_extra_settings && . bin/activate
# clone repo
git clone https://github.com/fabiocaccamo/django-extra-settings.git src && cd src
# run tests
python setup.py test
# or
python manage.py test --settings "tests.settings"
License
Released under MIT License.
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
Close
Hashes for django-extra-settings-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1953a7dc619b0a9bb3a02863ff723d53bc7228453ea470ee405dba0853ac29bf |
|
MD5 | 911ce693ef56f710c50f0e8122752800 |
|
BLAKE2b-256 | b45ba7c68d19506c01e5ba443aee19244b7a60b9d10b575c53f6ce45de272b22 |
Close
Hashes for django_extra_settings-0.1.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6cc0347e7ccecdc371bca470f54257add91f02727952d26ae872ab90d8fc0ba |
|
MD5 | 9657278b0dcf9d35e903d4cee0409e1e |
|
BLAKE2b-256 | d248f9c2e367d1561bae797649b061abeafd57288921a72e97612134fda81b40 |