﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33599	Enum is not usable in templates.	David Marogy	nobody	"Hello,

i tried using an normal Enum instead of a Textchoice in my Django-Template. I created a therefore simple tag which gets an enum(ModuleKind.SCHADENSANALYSE) and some other inputs. This resulted in getting an empty string string instead of an Enum. Searching for a way to solve this problem i stumbled upon https://stackoverflow.com/questions/35953132/how-to-access-enum-types-in-django-templates, which suggested a hack.

{{{
 {% module_info_tiles user ModuleKind.SCHADENSANALYSE versdb_1_host ""servicebots/index.html?bot_id=1327"" ""Schadenanalyse"" %}
}}}

Digging a little bit deeper, the same issue happend for enum types for another ticket: https://code.djangoproject.com/ticket/31154

The solution would be the same as in the previous ticket, making the Enum not callable in templates.

Best Regards
David"	Bug	closed	Uncategorized	3.2	Normal	wontfix	Enum, Template	david.marogy@…	Unreviewed	0	0	0	0	0	0
