My framework is raising a syntax error when I try to execute this code:
from django.template import Template, TemplateSyntaxError
try:
Template(value)
except TemplateSyntaxError as error:
raise forms.ValidationError(error)
return value
And here's the error:
from template_field import TemplateTextField, TemplateCharField
File "C:\django\internal\..\internal\cmsplugins\form_designer\template_field.py", line 14
except TemplateSyntaxError as error:
^
SyntaxError: invalid syntax
What's going on?