how do you pass a dict as a parameter to <%namespace:def
zzzeek opened this issue · 2 comments
zzzeek commented
Discussed in #396
Originally posted by jjgalvez May 5, 2024
How do I pass a dict to a def when it's called from <%namespace:def>.
I would expect that calling
<%namespace:def param="${ {'id':123} }"></namespace:def>
to work, but when I do I get an error saying I am missing a closing }
for reference <%call expr="namespace.def(param={'id':123})"></%call>
works as expected.
sqla-tester commented
Jose has proposed a fix for this issue in the main branch:
Update parsetree.py removed "?" from for x in re.compile(r"(${.+})" … https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/5296