Skip to main content

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 to settings.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-extra-settings, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size django_extra_settings-0.1.1-py2-none-any.whl (11.5 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size django-extra-settings-0.1.1.tar.gz (9.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page