django-extra-settings 0.1.2
pip install django-extra-settings==0.1.2
Newer version available (0.14.0)
Released:
easily manage typed extra settings using the django admin.
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Fabio Caccamo
- Tags django, admin, extra, settings, options, conf, config, editable, custom, dynamic, typed, constance
Classifiers
- Development Status
- Environment
- Framework
- Intended Audience
- License
- Natural Language
- Operating System
- Programming Language
- Topic
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'
Admin
Just go to the admin where you can:
- Create a new setting
- Update an existing setting
- Delete an existing setting
Python
You can retrieve settings programmatically:
from extra_settings.models import Setting
value = Setting.get('SETTING_NAME', default='django-extra-settings')
Templates
You can retrieve settings in templates:
{% load extra_settings %}
{% get_setting 'SETTING_NAME' default='django-extra-settings' %}
Testing
# create python virtual environment
virtualenv testing_django_extra_settings
# activate virtualenv
cd testing_django_extra_settings && . bin/activate
# clone repo
git clone https://github.com/fabiocaccamo/django-extra-settings.git src && cd src
# install dependencies
pip install -r requirements.txt
# run tests
tox
# or
python setup.py test
# or
python -m django test --settings "tests.settings"
License
Released under MIT License.
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Fabio Caccamo
- Tags django, admin, extra, settings, options, conf, config, editable, custom, dynamic, typed, constance
Classifiers
- Development Status
- Environment
- Framework
- Intended Audience
- License
- Natural Language
- Operating System
- Programming Language
- Topic
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
File details
Details for the file django-extra-settings-0.1.2.tar.gz
.
File metadata
- Download URL: django-extra-settings-0.1.2.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a839a5d87b9498d7b16f684fec8b3be645451808ce0d0b31997b116e796bcd4 |
|
MD5 | 68b5210219c6ceb848688c00c9bf30b1 |
|
BLAKE2b-256 | 20c2c13ecb176a27fe9cd95bb122d95ee12590d0962526ac26e43c4f1febb9cf |
File details
Details for the file django_extra_settings-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: django_extra_settings-0.1.2-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a8d2f808ae0c5c88347d42bfb2bdbb924aececec1090aa4c9415499ac43cf60 |
|
MD5 | 35c0a9e9f749229455b32653411720b7 |
|
BLAKE2b-256 | 16b32a0d6b4271700fb67e851f9f7a368eca7435d454f9771fddd661e7acc0d4 |