Closes #3052: Add Jinja2 support for export templates

This commit is contained in:
Jeremy Stretch
2019-04-08 12:20:24 -04:00
parent 7f6d79362e
commit 6f8591f769
9 changed files with 82 additions and 10 deletions

View File

@@ -55,10 +55,17 @@ class RenderedGraphSerializer(serializers.ModelSerializer):
#
class ExportTemplateSerializer(ValidatedModelSerializer):
template_language = ChoiceField(
choices=TEMPLATE_LANGUAGE_CHOICES,
default=TEMPLATE_LANGUAGE_JINJA2
)
class Meta:
model = ExportTemplate
fields = ['id', 'content_type', 'name', 'description', 'template_code', 'mime_type', 'file_extension']
fields = [
'id', 'content_type', 'name', 'description', 'template_language', 'template_code', 'mime_type',
'file_extension',
]
#