Skip to main content

django tree permisson

Project description

django-tree-perm

PyPI - Version GitHub Actions Workflow Status GitHub Actions Workflow Status Coveralls PyPI - Wheel PyPI - Python Version PyPI - Implementation GitHub License Read the Docs

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 或者直接查看源码注释。

1. 安装

pip install django-tree-perm

可查看版本变更记录 ChangeLog

2. 使用

在项目 settings.py 中配置引入:

INSTALLED_APPS = [
    # ...
    "django_tree_perm",
]

在项目 urls.py 中加入接口配置:

path("tree/", include("django_tree_perm.urls")),

执行数据库变更:

python manage.py migrate django_tree_perm

运行服务: python manage.py runserver 0.0.0.0:8000

可通过浏览器访问展示及管理页面 http://localhost:8000/tree/

3. 配置项

Django settings 额外扩展的配置项有:

配置项 类型 说明 默认值
TREE_DATETIME_FORMAT str 用于接口返回的 JSON 数据格式化时间 %Y-%m-%d %H:%M:%S UTC%z

4. Demo 示例

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

django_tree_perm-1.0.1.tar.gz (357.9 kB view details)

Uploaded Source

Built Distribution

django_tree_perm-1.0.1-py3-none-any.whl (354.1 kB view details)

Uploaded Python 3

File details

Details for the file django_tree_perm-1.0.1.tar.gz.

File metadata

  • Download URL: django_tree_perm-1.0.1.tar.gz
  • Upload date:
  • Size: 357.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for django_tree_perm-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e72f6b1e5661fdfda6906a7433a7185ba8bf0f98444d9f18674cfd3584801124
MD5 c2b4267095daa7b083b7bbfe5fadcd27
BLAKE2b-256 7df82864b612787cf4e80c82712e88e0b7fafabc89275001cd6bf84efe3b2675

See more details on using hashes here.

File details

Details for the file django_tree_perm-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_tree_perm-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 94a3969dc8793bd3585e9d7f409459e1513e4b7316a48dae1b6dea3dbb9b1dbd
MD5 effec3389de26a705aba500056adc97f
BLAKE2b-256 218c7bfec895f2109c73f79688a0ca4fca909e341b96588d437cbbbdc431920a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page