Skip to main content

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

  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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbsettings-0.9.8.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbsettings-0.9.8-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file dbsettings-0.9.8.tar.gz.

File metadata

  • Download URL: dbsettings-0.9.8.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for dbsettings-0.9.8.tar.gz
Algorithm Hash digest
SHA256 75f6f6942aaa459376f6af5eb342dd648c02baa5d40119ad29e472380e4b811b
MD5 5c10dc4dc36941df3ced20bde5971d79
BLAKE2b-256 a4995204a6d2bf3723daf8b2e3c198f4be176bbdc75c959b290e28e2de965556

See more details on using hashes here.

File details

Details for the file dbsettings-0.9.8-py3-none-any.whl.

File metadata

  • Download URL: dbsettings-0.9.8-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for dbsettings-0.9.8-py3-none-any.whl
Algorithm Hash digest
SHA256 cf2eeccdb4a709971329a9ddbf8d174a03326c6bc062472a663a54d42830613d
MD5 8f6f550f068303f96725303fc05c1966
BLAKE2b-256 6f54aeef546cb8661964aa5a11c38df2f1e812e4d4fa41ceed206920e2b08c1c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page