In Django Admin, it is possible to add a dropdown selector with all possible enum values like this example:
class ThesisStatus(models.TextChoices):
OPEN = 'O', _('Offen')
TAKEN = 'T', _('Vergeben')
WORK_IN_PROGRESS = 'W', _('In Arbeit')
COMPLETED = 'C', _('Komplett')
ABORTED = 'A', _('Abgebrochen')
status = models.CharField(
max_length=1,
choices=ThesisStatus.choices,
default=ThesisStatus.OPEN,
)
In wagtail, this does not work:
panels = [
FieldPanel('status'),
]
if the field is a CharField, but it does work for a TextField. How can I fix or implement this for CharField?