django-hashids:Django的非侵入式hashids库

时间:2021-05-10 01:38:12
【文件属性】:
文件名称:django-hashids:Django的非侵入式hashids库
文件大小:20KB
文件格式:ZIP
更新时间:2021-05-10 01:38:12
hashids django hacktoberfest django-hashids Python Django Hashids django-hashids是适用于Django的简单且非侵入式的hashids库。 它充当模型字段,但不涉及数据库或更改模型。 安装 pip install django-hashids django-hashids已在Django django-hashids和python django-hashids下进行了测试。 用法 将HashidsField添加到任何模型 class TestModel ( Model ): hashid = HashidsField ( real_field_name = "id" ) TestModel.hashid字段将代理TestModel.id字段,但所有查询将返回并接收hashid字符串。 TestModel.id将像以前一样工作。 例子 instance = TestModel . objects .
【文件预览】:
django-hashids-master
----.flake8(124B)
----.gitignore(3KB)
----README.md(3KB)
----.github()
--------workflows()
----tests()
--------settings.py(295B)
--------urls.py(17B)
--------test_django_hashids.py(7KB)
--------test_app()
--------__init__.py(0B)
----LICENSE(1KB)
----django_hashids()
--------field.py(3KB)
--------exceptions.py(39B)
--------__init__.py(60B)
----pyproject.toml(545B)
----poetry.lock(28KB)

网友评论