No description
Find a file
2020-08-21 17:09:21 +02:00
dbsettings I don't think there's any good reason not to use a TextField there. 2020-05-25 19:05:55 +02: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 Improve readme some more 2020-05-25 19:21:59 +02:00
setup.cfg Require Django! 2020-08-21 17:09:21 +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 polls 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.