Django application to provide a web interface to set a yet another django’s settings.
Basic usage
You can set a setting file containing some key-value pairs like django’s settings.py. Then a web interface to set setting values will be provided automatically.
The value in the setting file is handled as default value of web interface. A new value set from web interface overrides that default value.
The setting file will be like this:
TEST_WEBSETTING = 'default value'
SPAM = 'default spam'
Then you can get setting values from websettings.
>>> from websettings import websettings
>>> websettings.TEST_WEBSETTING
'default value'
After you set overriding value (like ‘after value’) by using web interface…:
>>> websettings.TEST_WEBSETTING
'after value'
Install
This library is registered in PyPI as django-websettings. You can install it as much as you like.
Setting
Websettings file
The position of the setting file is specified by a WEBSETTINGS_MODULE in your project’s settings.py file:
# In your settings.py file.
WEBSETTING_MODULE = 'yourproject.websettings'
Under project directory seems good. You should put these setting key’s by UPPER_CASE.
Web interface URL
The url to web interface to set setting values can be included like this:
# In your urls.py file.
url(r'^websettings/', include('websettings.urls'))
The admin user can only access this page.
Backend
django-websettings is designed to correspond to multiple backend to store settings.
You can specify the back end module to set a WEBSETTINGS_BACKEND in your project’s setting.py file:
# In your settings.py file
WEBSETTINGS_BACKEND = 'path.to.backend_module'
A DB backend (websetting.backends.db) is used by default.
Testing
django-websettings is tested by some environments, check out the Travis CI report.
Metadata
Release files for django-websettings 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-websettings-0.1.tar.gz | 25.0 kB | Without provenance | Details for django-websettings-0.1.tar.gz |
Release files / django-websettings-0.1.tar.gz
| Download URL | django-websettings-0.1.tar.gz |
|---|---|
| Size | 25.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72a2b5f85a20fd6839ee8bc70c51d4695dc9a6f21e022f2aec521d1e31251e92
|
|
BLAKE2b-256 checksum How to use checksums |
312758af163d70d034c6d9ff95ef9f41dea14a8d2310a94d75f059b79b53de14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-websettings 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.