You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The usage is wrong!
when you wrote @a = 1 it's equal to @(a) = 1.
"= 1" is text and "a" is a local variable.
what you actually needs is @(a = 1) and pyrazor do not support parenthesis yet.
Can local variables be defined and used in the template?
I tried to use template as simple as following:
and expected that the produced output will be
1
, but it failed with the error:NameError: global name 'a' is not defined
Locally, I added a unit test, reproducing this issue:
Am I missing something?
The text was updated successfully, but these errors were encountered: