1. Michael Bayer
  2. mako

Issues

Issue #222 new

Dict can not be passed to a function when using the “custom tag” format

guest
created an issue

A SyntaxError (unexpected EOF) is raised when trying to pass a dict.

<%form:form id="service-form"
    action="${request.current_route_url(action='update')}"
    buttons="${False}"
    data_attrs="${ {'data-form-primary': ''} }">

I am using mako 0.8.1, python 2.7 on OSX 10.8.

A workaround is to use the dict constructor or to declare the dict before passing it

e.g.

<% data_attr={'data-form-primary': ''} %>
<%form:form id="service-form"
    action="${request.current_route_url(action='update')}"
    buttons="${False}"
    data_attrs="${ data_attr }">

Comments (1)

  1. Log in to comment