Originally a part of PR #2136. Like @niklasmohrin suggested, I pulled the specific changes required to make Evaluation.State an enum.
In the process I discovered Django's own models.IntegerChoices, which works even better than the python IntEnum. It also generates a migration that does not depend on the Evaluation class (also an issue @niklasmohrin mentioned)
Originally a part of PR #2136. Like @niklasmohrin suggested, I pulled the specific changes required to make
Evaluation.State
an enum.In the process I discovered Django's own
models.IntegerChoices
, which works even better than the pythonIntEnum
. It also generates a migration that does not depend on theEvaluation
class (also an issue @niklasmohrin mentioned)