Skip to main content

Django live settings with pluggable backends, including Redis. Leonardo Fork from Jannis Leidel

Project description

Constance - Dynamic Django settings

This is adopted version of standard library for Leonardo CMS.

Additionaly features:

* boolean, numbers, strings, dictionaries
* support for Django 1.8 +
* basic grouping via ``CONSTANCE_CONFIG_GROUPS`` which makes tabs for django admin
* access to config keys from standard django settings
* really live settings, set every value to django settings and respect the default value from them

.. code-block:: python

'MEDIA_ENABLED': (True, 'Help Text'),
'SMALL': '64x64',
'MEDIUM': '265x265',
}, 'Help Text')

.. code-block:: python

MY_AWESOME_KEY: ('default', help text)

.. code-block:: python

from django.conf import settings


.. code-block:: python

DEBUG = True

DEBUG: (False, help text)

from django.conf import settings
-> True

after setting up value in the admin to False::

from django.conf import settings
-> False

If you can add your custom field types, you can use the
`CONSTANCE_ADDITIONAL_FIELDS` variable. Note that you must
use later evaluated strings instead of direct classes:

.. code-block:: python
'yes_no_null_select': ['django.forms.fields.ChoiceField',
'widget': 'django.forms.Select',
'choices': (("-----", None), ("yes", "Yes"), ("no", "No"))

'MY_SELECT_KEY': ('yes', 'select yes or no', 'yes_no_null_select'),

.. image::
:alt: Build Status

A Django app for storing dynamic settings in pluggable backends (Redis and
Django model backend built in) with an integration with the Django admin app.

For more information see the documentation at:

If you have questions or have trouble using the app please file a bug report

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

leonardo-constance- (124.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page