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
It's not clear what variables are available to the template when requesting data over the wire. It would be best if we created a static data structure and populated it with the values from the charmstore requests so that any future developer can see what data is available.
For the variables passed to the templates this is the proper place to do this manipulation and then it becomes the same across the app (in the code introduced in the linked PR above there were a number of bugs introduced by even that small amount of code).
I'll put up a PR moving these into the model code.
For variables that don't make sense to go in the models there is also the possibility of assigning to variables inside the templates e.g. {% set entity_data = context.entity.charm_data %}. This way the standard models can be passed to the those templates wherever they are used and there is no need to do variable name changes in multiple views that might use that template (esp for included blocks).
It's not clear what variables are available to the template when requesting data over the wire. It would be best if we created a static data structure and populated it with the values from the charmstore requests so that any future developer can see what data is available.
https://github.com/canonical-websites/jaas.ai/pull/79/files#r269294127
The text was updated successfully, but these errors were encountered: