A Django app to store key-value pairs in the database
Project description
django-dbsettings
dbsettings is a simple reusable Django app allowing you to store key-value pairs in your database, so you can store configuation in your database easily.
Quick start
-
Add "dbsettings" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ..., 'dbsettings', ]
-
Run
python manage.py makemigrations dbsettings
andpython manage.py migrate dbsettings
to create the models. -
Start the development server and visit http://127.0.0.1:8000/admin/ to add configuration values or use dbsettings.functions.setValue(key, value) in your code.
-
To retrieve a configuration value from the database, use dbsettings.functions.getValue(key) in your code.
Upgrade notes
When upgrading to 0.9 from a previous version, your database tables will need to be updated. To do this, just execute step 2 from the "Quick start" section again.
When upgrading to 0.9.5 or later from a previous version, you should first uninstall the old version. To do that, run:
pip install dbsettings```
Project details
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
Hashes for dbsettings-0.9.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb0811127ace6b722403131dfef6e23656d962b1441ab3ff1530b072bc3ba077 |
|
MD5 | bba3a8c47624ecb3e17a3d0907043bec |
|
BLAKE2b-256 | 3b058d21683ca81bb94441040394107ced8141a54e34a5a43232c79baf70f2c4 |