No description
Find a file
2021-02-12 13:20:38 +00:00
dbsettings Add (lazy) DBSettings object inspired by django.conf.settings 2020-12-30 10:32:27 +01:00
.gitignore Add default option to dbsetting template tag 2020-04-16 09:51:48 +02: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:20:38 +00:00
setup.cfg Change project name 2021-02-12 13:19:22 +00: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.