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.6.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

dbsettings-0.9.6-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dbsettings-0.9.6.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for dbsettings-0.9.6.tar.gz
Algorithm Hash digest
SHA256 5446461dfe722aa67499a29f64f742d924862d17228900c9f19c3854546c9598
MD5 f3d7eb74552ad93da61280bba07f99bb
BLAKE2b-256 a6d390148651eb4524013ae6cb2be57ed9c83c73a345da82ebc8136a03647856

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbsettings-0.9.6-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for dbsettings-0.9.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2e712c212430938202a81c1f85f74301d2d35b48683844db218a7124b61102cf
MD5 dd036b30035975da3c277a6841d1ebee
BLAKE2b-256 a8124f308b05b3b8ae866b20839a1fadda56f4e6fde7453790dc92757615c375

See more details on using hashes here.

Supported by

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