Skip to content

Crystalnix/django-dynamic-preferences

 
 

Repository files navigation

django-dynamic-preferences

https://badge.fury.io/py/django-dynamic-preferences.png https://readthedocs.org/projects/django-dynamic-preferences/badge/?version=latest https://travis-ci.org/EliotBerriot/django-dynamic-preferences.svg?branch=master https://travis-ci.org/EliotBerriot/django-dynamic-preferences.svg?branch=develop

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 2.7 and 3.4, with django 1.7 and 1.8.

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.

About

Dynamic global and instance settings for your django project

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 97.4%
  • Makefile 1.6%
  • HTML 1.0%