Skip to main content

Dynamic global and instance settings for your django project

Project description

https://badge.fury.io/py/django-dynamic-preferences.png https://readthedocs.org/projects/django-dynamic-preferences/badge/?version=latest https://github.com/agateblue/django-dynamic-preferences/actions/workflows/tests.yml/badge.svg Backers on Open Collective Sponsors on Open Collective

Dynamic-preferences is a Django app, BSD-licensed, designed to help you manage your project settings. While most of the time, a settings.py file is sufficient, there are some situations where you need something more flexible such as:

  • per-user settings (or, generally speaking, per instance settings)

  • settings change without server restart

For per-instance settings, you could actually store them in some kind of profile model. However, it means that every time you want to add a new setting, you need to add a new column to the profile DB table. Not very efficient.

Dynamic-preferences allow you to register settings (a.k.a. preferences) in a declarative way. Preferences values are serialized before storage in database, and automatically deserialized when you need them.

With dynamic-preferences, you can update settings on the fly, through django’s admin or custom forms, without restarting your application.

The project is tested and work under Python 3.7, 3.8, 3.9, 3.10 and 3.11 and with django 3.2 and 4.2.

Features

  • Simple to setup

  • Admin integration

  • Forms integration

  • Bundled with global and per-user preferences

  • Can be extended to other models if need (e.g. per-site preferences)

  • Integrates with django caching mechanisms to improve performance

Documentation

The full documentation is at https://django-dynamic-preferences.readthedocs.org.

Changelog

See https://django-dynamic-preferences.readthedocs.io/en/latest/history.html

Contributing

See https://django-dynamic-preferences.readthedocs.org/en/latest/contributing.html

Credits


Contributors


This project exists thanks to all the people who contribute!

https://opencollective.com/django-dynamic-preferences/contributors.svg?width=890&button=false

Backers


Thank you to all our backers! Become a backer.

https://opencollective.com/django-dynamic-preferences/backers.svg?width=890

Sponsors


Support us by becoming a sponsor. Your logo will show up here with a link to your website. Become a sponsor.

https://opencollective.com/django-dynamic-preferences/sponsor/0/avatar.svg

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

django_dynamic_preferences-1.17.0.tar.gz (51.3 kB view details)

Uploaded Source

Built Distribution

django_dynamic_preferences-1.17.0-py2.py3-none-any.whl (50.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django_dynamic_preferences-1.17.0.tar.gz.

File metadata

File hashes

Hashes for django_dynamic_preferences-1.17.0.tar.gz
Algorithm Hash digest
SHA256 c13520107d13c696997a237f8e7731cef93642837d523b95863a40115f7f2d8f
MD5 76060ba388c80701525afadba80a197a
BLAKE2b-256 6fbfb1b1554d71c10b4380aa4e060ec03bd1952a76d951b0faca6cc1581b99f2

See more details on using hashes here.

File details

Details for the file django_dynamic_preferences-1.17.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_dynamic_preferences-1.17.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1f7111e01235b6273a4038783d92a8bf2826cb4eee7e324779b2dc76e3e00b06
MD5 91f003cf9eb335b2c73d1bd28b1992ac
BLAKE2b-256 c57e386a9cb4fdc83bcc33a381842a8e359621c780f24ba820c3080406edaafe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page