Written by experienced developers

Implementation of enumeration classes in Django models

In official Django documentation, you can read how to use choices for a field. In general, they recommend using the predefined list of values in the class. To make our models a little bit more straightforward we can move predefined options into native Python enumerations. Enumerations (Python 3.4+) are a set of unique values.

Read article