You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -40,21 +38,23 @@ Full and natural support for enumerations_ as Django model fields.
40
38
41
39
Many packages aim to ease usage of Python enumerations as model fields. Most
42
40
were made obsolete when Django provided ``TextChoices`` and ``IntegerChoices``
43
-
types. The motivation for django-enum_ was to:
41
+
types. The motivation for `django-enum <https://django-enum.readthedocs.io/en/latest/>`_
42
+
was to:
44
43
45
44
* Always automatically coerce fields to instances of the Enum type.
46
45
* Allow strict adherence to Enum values to be disabled.
47
46
* Handle migrations appropriately. (See `migrations <https://django-enum.readthedocs.io/en/latest/usage.html#migrations>`_)
48
47
* Integrate as fully as possible with Django_'s existing level of enum support.
49
-
* Integrate with enum-properties_ to enable richer enumeration types.
48
+
* Integrate with `enum-properties <https://pypi.org/project/enum-properties/>`_ to enable richer enumeration types.
50
49
* Represent enum fields with the smallest possible column type.
51
50
* Be as simple and light-weight an extension to core Django as possible.
52
51
53
-
django-enum_ works in concert with Django_'s built in ``TextChoices`` and
54
-
``IntegerChoices`` to provide a new model field type, ``EnumField``, that
55
-
resolves the correct native Django_ field type for the given enumeration based
56
-
on its value type and range. For example, ``IntegerChoices`` that contain
57
-
values between 0 and 32767 become `PositiveSmallIntegerField <https://docs.djangoproject.com/en/stable/ref/models/fields/#positivesmallintegerfield>`_.
52
+
`django-enum <https://django-enum.readthedocs.io/en/latest/>`_ works in concert
53
+
with Django_'s built in ``TextChoices`` and ``IntegerChoices`` to provide a
54
+
new model field type, ``EnumField``, that resolves the correct native Django_
55
+
field type for the given enumeration based on its value type and range. For
56
+
example, ``IntegerChoices`` that contain values between 0 and 32767 become
0 commit comments