django-environment-settings
允许Django应用从settings.py或环境变量中获取配置。
安装
pip install django-environment-settings
使用
app/settings.py
import django_environment_settings
APP_CONFIG1 = django_environment_settings.get(
"APP_CONFIG_KEY1",
"DEFAULT_VALUE",
aliases=[
"APP_CONFIG_KEY1_ALIAS1",
"APP_CONFIG_KEY1_ALIAS2"
],
)
版本
0.1.1
- 版本首发。
0.1.2
- 使用
python_environment_settings以增强兼容性。
Release files for django-environment-settings 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-environment-settings-0.1.2.tar.gz | 6.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_environment_settings-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.5 kB
Release files / django-environment-settings-0.1.2.tar.gz
| Download URL | django-environment-settings-0.1.2.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb0c7550d6d047444e8789ea8d431639cab781d48ddbf65c0c0d8e5bc9d32197
|
|
BLAKE2b-256 checksum How to use checksums |
dbabfe75f0b5993796c68d17a939a75fc28276a30cb002a4843514fbec5ac726
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.9
|
Release files / django_environment_settings-0.1.2-py3-none-any.whl
| Download URL | django_environment_settings-0.1.2-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d92726790727847967b65801f34c59416a67e66a8602e61f9ed172b04824f900
|
|
BLAKE2b-256 checksum How to use checksums |
685bcdf51e1e1c1b82947cd62e131fd8604a5d10f75223bc79cd63cf0927d3c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.9
|