
Fix Django TextChoices Positional Arguments with Custom Metadata
During a recent modernization of a healthcare SaaS platform, we encountered a tricky TypeError when adding extra metadata fields to Django’s models.TextChoices. Here is how we correctly overrode the __new__ method to handle custom attributes without breaking Python’s Enum metaclass or Django’s field choices.













