Go to file
Kumi 2adcd09322
Added CI pipeline for testing and publishing
Introduced a GitLab CI configuration to automate the testing and publishing of the package. The pipeline runs tests and, on tagged commits, publishes the package to PyPI using stored credentials, ensuring a streamlined release process.
2023-12-22 12:15:30 +01:00
dbsettings Add migration 0001 2023-06-09 16:15:05 +02:00
.gitignore Add migration 0001 2023-06-09 16:15:05 +02:00
.gitlab-ci.yml Added CI pipeline for testing and publishing 2023-12-22 12:15:30 +01:00
LICENSE Preparing for packaging 2020-04-16 09:07:23 +02:00
MANIFEST.in Preparing for packaging 2020-04-16 09:07:23 +02:00
README.md Fix README 2021-02-12 13:31:44 +00:00
setup.cfg Add migration 0001 2023-06-09 16:15:05 +02:00
setup.py Require Django! 2020-08-21 17:09:21 +02:00

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

  1. Add "dbsettings" to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
         ...,
         'dbsettings',
     ]
    
  2. Run python manage.py makemigrations dbsettings and python manage.py migrate dbsettings to create the models.

  3. 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.

  4. 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