Should my controller return something like this?...
return {"my_object" : some_instance_of_Company}
If so, how access in templates??? Like this?...
${my_object["some_key"] } ???
Thanks!
BTW,
I'm confused because keys are usually strings but you don't quote them
in templates.
e.g. ${my_string} is right rather than ${"my_string"} why?
chris
Depends where you want to access it. Inside py: attributes and <?python>
PIs you would access it simply as my_object; inside other attributes and
ordinary HTML you would write ${my_object} or short $my_object.
> I'm confused because keys are usually strings but you don't quote them
> in templates.
> e.g. ${my_string} is right rather than ${"my_string"} why?
This is explained here:
http://kid-templating.org/guide.html#template-variables
-- Christoph