File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed
Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1+ import sys
12from django .contrib import admin
23
34from tests .examples .models import (
Original file line number Diff line number Diff line change 1+ import sys
12from .mapbox import Map
23from .strict import StrictExample
34from .no_coerce import NoCoerceExample
1213from .gnss_vanilla import GNSSReceiverBasic
1314from .equivalency import EquivalencyExample
1415from .extern import ExternalChoices
15- from .text_choices import TextChoicesExample
1616from .flag_howto import Group
17+ from .text_choices import TextChoicesExample
Original file line number Diff line number Diff line change 1- from enum import StrEnum
1+ from enum import Enum
22from django .db import models
33from django_enum import EnumField
44
55
66class ExternalChoices (models .Model ):
77
8- class TextEnum (StrEnum ):
8+ class TextEnum (str , Enum ):
99
1010 VALUE0 = 'V0'
1111 VALUE1 = 'V1'
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class Color(TextChoices):
2626 # to make it case-insensitive we can override the property
2727 # and mark it like this:
2828 @symmetric (case_fold = True )
29- @models . enums . enum_property
29+ @property
3030 def label (self ) -> str :
3131 return self ._label_
3232
You can’t perform that action at this time.
0 commit comments