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 uninstall django-dbsettings
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
File details
Details for the file dbsettings-0.9.7.tar.gz
.
File metadata
- Download URL: dbsettings-0.9.7.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f8c245161ec65b7674ce43d4ae62504fe1e3e11caa9afaf6608c12348b3cb46 |
|
MD5 | 039afd31e6fc916ca1a468bbf38f4766 |
|
BLAKE2b-256 | a6df9d5b5baba6f851f9c1ab59e7976ba4bf8060eda7018bc4fe1140e3d3af60 |
File details
Details for the file dbsettings-0.9.7-py3-none-any.whl
.
File metadata
- Download URL: dbsettings-0.9.7-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a59352ebdec82a43837987a05015c9f7d2ac69b89e0f23d2367956bd966fc43a |
|
MD5 | 29a3c7404fbc354d60a26edd494c27d8 |
|
BLAKE2b-256 | b1beee69320bf6ec8707ec98b670ccfeddfc1a17f1d45ee7ddc7f03c08393c53 |