-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected output
in template
#38
Comments
I suggest always giving a default value to your variables. Instead of leaving |
In AspenWeb/pando.py#426 it was with |
I'm okay with that if it's only at the simplate level (i.e. when building the context in |
output
in template
We could also close this as a dupe of AspenWeb/pando.py#30. |
Or perhaps close that as a dupe of this, since I think we want it in this repo instead of that one. |
#27 is my preferred alternative solution to AspenWeb/pando.py#30. |
Ah, that's right. :-) Closing in favor of #27. |
I am upgrading a (closed-source) project to Aspen 1.0rc2. In one simplate I conditionally assign a variable
output
in the request-time Python section, and then conditionally show a message based on the truthiness of the variable. Under 1.0rc2, there is anoutput
object in the default simplate context, so the value is always truthy. I know we've touched on this area before, but I forget where things stand: am I supposed to know this somehow and just be careful with a name like that?I think the only place we ever really hit this was with
response
, because we'd do an HTTP call from inside a simplate and bind the result toresponse
, which would overwrite the in-progress Aspen response. Should we rename this toaspen_output
to avoid the conflict? Should we prefix other names, likepath
andqs
?The text was updated successfully, but these errors were encountered: