Fix bug left over from work on #3569

This commit is contained in:
Jeremy Stretch 2019-12-11 16:16:14 -05:00
parent 577b4593de
commit 590bbbce7f

View File

@ -506,11 +506,11 @@ class ExportTemplate(models.Model):
'queryset': queryset 'queryset': queryset
} }
if self.template_language == TEMPLATE_LANGUAGE_DJANGO: if self.template_language == ExportTemplateLanguageChoices.LANGUAGE_DJANGO:
template = Template(self.template_code) template = Template(self.template_code)
output = template.render(Context(context)) output = template.render(Context(context))
elif self.template_language == TEMPLATE_LANGUAGE_JINJA2: elif self.template_language == ExportTemplateLanguageChoices.LANGUAGE_JINJA2:
template = Environment().from_string(source=self.template_code) template = Environment().from_string(source=self.template_code)
output = template.render(**context) output = template.render(**context)