#33599: Enum is not usable in templates.
--------------------------------+--------------------------------------
Reporter: David Marogy | Owner: nobody
Type: Bug | Status: closed
Component: Uncategorized | Version: 3.2
Severity: Normal | Resolution: wontfix
Keywords: Enum, Template | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Changes (by Carlton Gibson):
* status: new => closed
* resolution: => wontfix
Comment:
Unlike Django's choices enum subclasses that we were able to adjust in
#31154, Python's Enum type isn't something we can add attributes to in
Django.
The decorator suggestion on the SO thread seems like a way to go. (Equally
you can add the attribute by hand in e.g. `get_context_data`).
--
Ticket URL: <https://code.djangoproject.com/ticket/33599#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107017fbc0a9d00-60da09a5-44dc-4bc6-83b5-929b14b4e5c5-000000%40eu-central-1.amazonses.com.