A Django app to save app settings in DB as classes.
Project description
django-db-settings is a Django app to save your configuration in cacheable DB objects that are easily defined like classes.
Quick start
Add “settings” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'settings', ]
Include the settings URLconf in your project urls.py like this:
path('settings/', include('settings.urls')),
Run python manage.py migrate to create the settings models.
Start the development server and visit http://127.0.0.1:8000/admin/ to setup your app settings (you’ll need the Admin app enabled).
Visit http://127.0.0.1:8000/settings/?setting=YOUR_SETTING to get the objects related to that specific setting (JSON).
Find the REFRESH SETTINGS button with in Value model change list page. This project uses TTL based cache, which can be configured by adding the following setting:
SETTINGS_CACHE_MAXSIZE: To set the maximum size of total items in the cache. By default set to 100.
SETTINGS_CACHE_TTL: To set the Time To Live of the cache items. By default set to 3600 seconds (1 hour).
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
Built Distribution
File details
Details for the file django-db-settings-1.0.0.tar.gz
.
File metadata
- Download URL: django-db-settings-1.0.0.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd1e67729c0e334c4ce94f952f3518dbaa449daba1247b1db130ce402ecfc140 |
|
MD5 | 947b1887f8c96e05a7e327eb2f208a18 |
|
BLAKE2b-256 | f0110abf64b94a8b900a34d9bcdff19794e5b933a12e61a8e48985b31ac144f5 |
File details
Details for the file django_db_settings-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: django_db_settings-1.0.0-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bd900c66be9ded6c81a399b7e1b506403ff85970be302eebf4d91f6e8b6431c |
|
MD5 | 63373304fa53c7424fd27755819b1800 |
|
BLAKE2b-256 | 783f6b0e9d19ab4bcbc911eaaf54694f672ddfba8b2f04221f35a3a28aaa1254 |