# django-app-metadata
Django数据字典管理应用。
## 安装
```shell
pip install django-app-metadata
```
## 使用
*app/views.py*
```python
from django_app_metadata.models import Config
def get_config(request):
key = reqeust.GET.get("key")
value = Config.get(key, default=None, default_published=True, frontend_flag=True)
return value
```
## 版本记录
### v0.1.0
- 版本首发。
- 数据字典管理。
- 数据字典获取支持缓存。
### v0.1.1
- 修改:使用`django-environment-settings`获取系统配置以增强应用的兼容性。
- 修改:`AccessToUnpublishedConfigIsForbidden`添加错误信息,支持中英双语。
- 修正:添加`django-model-helper`依赖关系。
### v0.1.2
- 修正:`Config.Meta.permissions`添加其它基础类的相关`permissions`。
Raw data
{
"_id": null,
"home_page": null,
"name": "django-app-metadata",
"maintainer": "rRR0VrFP",
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "django-app-metadata, django",
"author": "rRR0VrFP",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/f0/0b/27eb54d81b7106af6d4d432098d24ccc99b7b4d8e7a2fab61d8343c1f8d2/django-app-metadata-0.1.2.tar.gz",
"platform": null,
"description": "# django-app-metadata\r\n\r\nDjango\u6570\u636e\u5b57\u5178\u7ba1\u7406\u5e94\u7528\u3002\r\n\r\n## \u5b89\u88c5\r\n\r\n```shell\r\npip install django-app-metadata\r\n```\r\n\r\n## \u4f7f\u7528\r\n\r\n*app/views.py*\r\n\r\n```python\r\nfrom django_app_metadata.models import Config\r\n\r\ndef get_config(request):\r\n key = reqeust.GET.get(\"key\")\r\n value = Config.get(key, default=None, default_published=True, frontend_flag=True)\r\n return value\r\n```\r\n\r\n## \u7248\u672c\u8bb0\u5f55\r\n\r\n### v0.1.0\r\n\r\n- \u7248\u672c\u9996\u53d1\u3002\r\n- \u6570\u636e\u5b57\u5178\u7ba1\u7406\u3002\r\n- \u6570\u636e\u5b57\u5178\u83b7\u53d6\u652f\u6301\u7f13\u5b58\u3002\r\n\r\n### v0.1.1\r\n\r\n- \u4fee\u6539\uff1a\u4f7f\u7528`django-environment-settings`\u83b7\u53d6\u7cfb\u7edf\u914d\u7f6e\u4ee5\u589e\u5f3a\u5e94\u7528\u7684\u517c\u5bb9\u6027\u3002\r\n- \u4fee\u6539\uff1a`AccessToUnpublishedConfigIsForbidden`\u6dfb\u52a0\u9519\u8bef\u4fe1\u606f\uff0c\u652f\u6301\u4e2d\u82f1\u53cc\u8bed\u3002\r\n- \u4fee\u6b63\uff1a\u6dfb\u52a0`django-model-helper`\u4f9d\u8d56\u5173\u7cfb\u3002\r\n\r\n### v0.1.2\r\n\r\n- \u4fee\u6b63\uff1a`Config.Meta.permissions`\u6dfb\u52a0\u5176\u5b83\u57fa\u7840\u7c7b\u7684\u76f8\u5173`permissions`\u3002\r\n",
"bugtrack_url": null,
"license": "Apache License, Version 2.0",
"summary": "Django\u6570\u636e\u5b57\u5178\u7ba1\u7406\u5e94\u7528\u3002",
"version": "0.1.2",
"project_urls": null,
"split_keywords": [
"django-app-metadata",
" django"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b660299a2743870243d0767619fcdf447e179784750a8b64f0da6b0ad465f235",
"md5": "009b5920c916975f4893d07157394fb3",
"sha256": "7f5be83508924230641ab9e42d3eee841e65eb332ed86e394d50904662bef90e"
},
"downloads": -1,
"filename": "django_app_metadata-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "009b5920c916975f4893d07157394fb3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 15400,
"upload_time": "2024-12-27T04:43:00",
"upload_time_iso_8601": "2024-12-27T04:43:00.568811Z",
"url": "https://files.pythonhosted.org/packages/b6/60/299a2743870243d0767619fcdf447e179784750a8b64f0da6b0ad465f235/django_app_metadata-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f00b27eb54d81b7106af6d4d432098d24ccc99b7b4d8e7a2fab61d8343c1f8d2",
"md5": "dde441341f6eadc454d494296ee1d4f8",
"sha256": "26109352c5f171f2e4f2c4de2492ca3321d225be759232f0039c2f9b1f45a345"
},
"downloads": -1,
"filename": "django-app-metadata-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "dde441341f6eadc454d494296ee1d4f8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12798,
"upload_time": "2024-12-27T04:43:02",
"upload_time_iso_8601": "2024-12-27T04:43:02.889590Z",
"url": "https://files.pythonhosted.org/packages/f0/0b/27eb54d81b7106af6d4d432098d24ccc99b7b4d8e7a2fab61d8343c1f8d2/django-app-metadata-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-27 04:43:02",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "django-app-metadata"
}