I was adding a condition in for my mail template.
given bellow:
%if len(l.name) > 56.0:
${l.product_id.name[28:56].ljust(28) if l.product_id else l.name[28:56].ljust(28) }
% endif
Listing the step i have done:
1) Called template._render_template() function and storing it in a text field.
2) Everything was perfect and i just added above code.
3) now showing jinja2.exceptions.TemplateSyntaxError: unexpected char '&'
Any Suggestions.