django-enum-ex
一个基于 Django 3.0 Choices 枚举类型的独立扩展包
本库基于 Django 3.0 中自带的 django.db.models.enum
特色
- 支持将枚举字段名自设置为值. 设置值为
enum.auto() - 支持将单一值即设置为值,又设置为
label, 通过设置类属性__value_as_label__ = True - 增加
Choices.of方法,在将原始值转成枚举值时,支持忽略大小定. 支持没有匹配枚举值时,抛出错误. - 增加
IntegerChoicesField和TextChoicesField两个Model Field
Release files for django-enum-ex 0.2.0
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-enum-ex-0.2.0.tar.gz | 5.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_enum_ex-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.6 kB
Release files / django-enum-ex-0.2.0.tar.gz
| Download URL | django-enum-ex-0.2.0.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74260ec2197e5a3e65388756038ab4537a8956a051590aa39dc2103e09c76fd9
|
|
BLAKE2b-256 checksum How to use checksums |
541b87de229f32957b9b017137242882ceb11f0407b863394771fc7b8dfff770
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.17 CPython/3.7.3 Darwin/18.7.0
|
Release files / django_enum_ex-0.2.0-py3-none-any.whl
| Download URL | django_enum_ex-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a515b2fc21804679ab04ec14eef49ee9ba7960674661afcc32529f03e85668e
|
|
BLAKE2b-256 checksum How to use checksums |
aa34ca6a117cc2e2612ff7d19f11225d1d6ffa6652bf01d2ccb2e9ef4d6a430f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.17 CPython/3.7.3 Darwin/18.7.0
|