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
Usage
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'
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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04c993b896141b0a723a90bf4fe4a50828f4765a834e4a27fd974a1475f8f06e |
|
MD5 | ad58f67d87dbd11d41c632a9da14d4c9 |
|
BLAKE2b-256 | 73e41a2f6e3e4a95d50328586c77c827dabbe4259c023c64a4bd9be1c61dcdc9 |
Close
Hashes for django_extra_settings-0.1.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e197ae18ea3a1e1c34e0c426324603c00657c6397edfaabc28584cf0683bac19 |
|
MD5 | 3b751b396d8739d797db4bae08567977 |
|
BLAKE2b-256 | 072db7045e45ee73f2b5166ff0dac75961cacff8a994943c3de372467cf55c73 |