Quantcast
Channel: Mako: Ticket Query
Viewing all articles
Browse latest Browse all 38

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

$
0
0

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 }">

Viewing all articles
Browse latest Browse all 38

Trending Articles