# django-tree-perm
[![PyPI - Version](https://img.shields.io/pypi/v/django-tree-perm)](https://github.com/SkylerHu/django-tree-perm)
[![GitHub Actions Workflow Status](https://github.com/SkylerHu/django-tree-perm/actions/workflows/pre-commit.yml/badge.svg?branch=master)](https://github.com/SkylerHu/django-tree-perm)
[![GitHub Actions Workflow Status](https://github.com/SkylerHu/django-tree-perm/actions/workflows/test-py3.yml/badge.svg?branch=master)](https://github.com/SkylerHu/django-tree-perm)
[![Coveralls](https://img.shields.io/coverallsCoverage/github/SkylerHu/django-tree-perm?branch=master)](https://github.com/SkylerHu/django-tree-perm)
[![PyPI - Wheel](https://img.shields.io/pypi/wheel/django-tree-perm)](https://github.com/SkylerHu/django-tree-perm)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-tree-perm)](https://github.com/SkylerHu/django-tree-perm)
[![PyPI - Implementation](https://img.shields.io/pypi/implementation/django-tree-perm)](https://github.com/SkylerHu/django-tree-perm)
[![GitHub License](https://img.shields.io/github/license/SkylerHu/django-tree-perm)](https://github.com/SkylerHu/django-tree-perm)
[![Read the Docs](https://img.shields.io/readthedocs/django-tree-perm)](https://django-tree-perm.readthedocs.io)
django-tree-perm is implemented by Django and provides interfaces and pages for managing tree data structure nodes.
django-tree-perm 是 Django 实现的,提供了树形数据结构结点管理的接口和页面。
主要应用场景有:
- CMDB 服务树的管理;
- web 项目页面权限的管理控制;
具体使用说明可以查看 [readthedocs](https://django-tree-perm.readthedocs.io) 或者直接查看源码注释。
## 1. 安装
pip install django-tree-perm
可查看版本变更记录 [ChangeLog](https://github.com/SkylerHu/django-tree-perm/blob/master/docs/CHANGELOG-1.x.md)
## 2. 使用
在项目 `settings.py` 中配置引入:
```python
INSTALLED_APPS = [
# ...
"django_tree_perm",
]
```
在项目 `urls.py` 中加入接口配置:
```python
path("tree/", include("django_tree_perm.urls")),
```
执行数据库变更:
```shell
python manage.py migrate django_tree_perm
```
运行服务: `python manage.py runserver 0.0.0.0:8000`
可通过浏览器访问展示及管理页面 `http://localhost:8000/tree/`
## 3. Demo 示例
![](https://github.com/SkylerHu/django-tree-perm/blob/master/docs/statics/demo.gif)
Raw data
{
"_id": null,
"home_page": "https://github.com/SkylerHu/django-tree-perm.git",
"name": "django-tree-perm",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "cmdb, tree, tree-permission",
"author": "SkylerHu",
"author_email": "skylerhu@qq.com",
"download_url": "https://files.pythonhosted.org/packages/b4/2e/943da219c81b072966fa753562474260da87fe040efa14853a186f6a842b/django_tree_perm-1.0.0.tar.gz",
"platform": "any",
"description": "# django-tree-perm\n\n[![PyPI - Version](https://img.shields.io/pypi/v/django-tree-perm)](https://github.com/SkylerHu/django-tree-perm)\n[![GitHub Actions Workflow Status](https://github.com/SkylerHu/django-tree-perm/actions/workflows/pre-commit.yml/badge.svg?branch=master)](https://github.com/SkylerHu/django-tree-perm)\n[![GitHub Actions Workflow Status](https://github.com/SkylerHu/django-tree-perm/actions/workflows/test-py3.yml/badge.svg?branch=master)](https://github.com/SkylerHu/django-tree-perm)\n[![Coveralls](https://img.shields.io/coverallsCoverage/github/SkylerHu/django-tree-perm?branch=master)](https://github.com/SkylerHu/django-tree-perm)\n[![PyPI - Wheel](https://img.shields.io/pypi/wheel/django-tree-perm)](https://github.com/SkylerHu/django-tree-perm)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-tree-perm)](https://github.com/SkylerHu/django-tree-perm)\n[![PyPI - Implementation](https://img.shields.io/pypi/implementation/django-tree-perm)](https://github.com/SkylerHu/django-tree-perm)\n[![GitHub License](https://img.shields.io/github/license/SkylerHu/django-tree-perm)](https://github.com/SkylerHu/django-tree-perm)\n[![Read the Docs](https://img.shields.io/readthedocs/django-tree-perm)](https://django-tree-perm.readthedocs.io)\n\ndjango-tree-perm is implemented by Django and provides interfaces and pages for managing tree data structure nodes.\n\ndjango-tree-perm \u662f Django \u5b9e\u73b0\u7684\uff0c\u63d0\u4f9b\u4e86\u6811\u5f62\u6570\u636e\u7ed3\u6784\u7ed3\u70b9\u7ba1\u7406\u7684\u63a5\u53e3\u548c\u9875\u9762\u3002\n\n\u4e3b\u8981\u5e94\u7528\u573a\u666f\u6709\uff1a\n\n- CMDB \u670d\u52a1\u6811\u7684\u7ba1\u7406\uff1b\n- web \u9879\u76ee\u9875\u9762\u6743\u9650\u7684\u7ba1\u7406\u63a7\u5236\uff1b\n\n\n\u5177\u4f53\u4f7f\u7528\u8bf4\u660e\u53ef\u4ee5\u67e5\u770b [readthedocs](https://django-tree-perm.readthedocs.io) \u6216\u8005\u76f4\u63a5\u67e5\u770b\u6e90\u7801\u6ce8\u91ca\u3002\n\n## 1. \u5b89\u88c5\n\n pip install django-tree-perm\n\n\u53ef\u67e5\u770b\u7248\u672c\u53d8\u66f4\u8bb0\u5f55 [ChangeLog](https://github.com/SkylerHu/django-tree-perm/blob/master/docs/CHANGELOG-1.x.md)\n\n## 2. \u4f7f\u7528\n\n\u5728\u9879\u76ee `settings.py` \u4e2d\u914d\u7f6e\u5f15\u5165\uff1a\n\n```python\nINSTALLED_APPS = [\n # ...\n \"django_tree_perm\",\n]\n```\n\n\u5728\u9879\u76ee `urls.py` \u4e2d\u52a0\u5165\u63a5\u53e3\u914d\u7f6e\uff1a\n\n```python\npath(\"tree/\", include(\"django_tree_perm.urls\")),\n```\n\n\u6267\u884c\u6570\u636e\u5e93\u53d8\u66f4\uff1a\n\n```shell\npython manage.py migrate django_tree_perm\n```\n\n\u8fd0\u884c\u670d\u52a1\uff1a `python manage.py runserver 0.0.0.0:8000`\n\n\u53ef\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee\u5c55\u793a\u53ca\u7ba1\u7406\u9875\u9762 `http://localhost:8000/tree/`\n\n## 3. Demo \u793a\u4f8b\n\n![](https://github.com/SkylerHu/django-tree-perm/blob/master/docs/statics/demo.gif)\n",
"bugtrack_url": null,
"license": "MIT Licence",
"summary": "django tree permisson",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/SkylerHu/django-tree-perm.git"
},
"split_keywords": [
"cmdb",
" tree",
" tree-permission"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "64f2440a0904ac759e0dadcfba0522da293eb3a9c8423ed48553601102b227b3",
"md5": "0425086d8012b59eb80f6279bddd8c7e",
"sha256": "06323cf04547bc004c4e104d6174bfd43219e14865711174418c0a6c2ae2f468"
},
"downloads": -1,
"filename": "django_tree_perm-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0425086d8012b59eb80f6279bddd8c7e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 354252,
"upload_time": "2024-10-25T14:24:45",
"upload_time_iso_8601": "2024-10-25T14:24:45.897768Z",
"url": "https://files.pythonhosted.org/packages/64/f2/440a0904ac759e0dadcfba0522da293eb3a9c8423ed48553601102b227b3/django_tree_perm-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b42e943da219c81b072966fa753562474260da87fe040efa14853a186f6a842b",
"md5": "bad108f3108bb5b0a0994a30dbc8caef",
"sha256": "d7381266d12c4229d80e69101bba32f47cbb7257e6e5ab19dde3ba23eb103269"
},
"downloads": -1,
"filename": "django_tree_perm-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "bad108f3108bb5b0a0994a30dbc8caef",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 357723,
"upload_time": "2024-10-25T14:24:50",
"upload_time_iso_8601": "2024-10-25T14:24:50.741017Z",
"url": "https://files.pythonhosted.org/packages/b4/2e/943da219c81b072966fa753562474260da87fe040efa14853a186f6a842b/django_tree_perm-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-25 14:24:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "SkylerHu",
"github_project": "django-tree-perm",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"tox": true,
"lcname": "django-tree-perm"
}