On Feb 20, 9:08 am, 大郎 <[email protected]> wrote:
> web.template.Template.globals['is_login']=people_model.is_login
>From this page: http://webpy.org/docs/0.3/templetor
----
The following are still supported but not preferred.
* Using \$ for escaping dollar. Use $$ instead.
* Modifying web.template.Template.globals. pass globals to
web.template.render as argument instead.
----
Try this:
----
# Use webpy buildin templator.
render = web.template.render(
'templates', # template dir.
base='layout', # Use 'layout.html' as site layout
template.
cache=None,
globals={'_':_, 'session': session}, # Used for i18n.
)
----
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---