%locals().update(_vars).
%include subpage-ajax _vars=_vars
%_include('subpage/'+_vars['subpage'],_stdout, _vars=_vars)
%rebase layout-dynamic _vars=_vars
%_require_vars=['suburl']%[locals().update({k:_vars[k]}) for k in _require_vars]%_option_vars=['title','urlsubpage','urloptions','language']%[locals().update({k:_vars.get(k)}) for k in _option_vars]
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.
It is undocumented, but you can assign values to SimpleTemplate.defaults
> It is undocumented, but you can assign values to SimpleTemplate.defaults
Ah, we should document it then! :)
This is essentially what Django would call a context processor. They're quite
handy at preventing lots of cutting and pasting.
I did end up using a decorator, but SimpleTemplate.defaults sounds easier. Is
there a way using jinja2 templates?
Thanks,
Mike