On Jul 10, 4:37 am, aspineux <[EMAIL PROTECTED]> wrote:
> Hi
>
> I cannot find the way to access to old standard variable of tg1
>
> I can see in render.py
>
> def get_tg_vars():
> """Create a Bunch of variables that should be available in all
> templates.
>
> These variables are:
>
> selector
> the selector function
> checker
> ....
>
> But cannot find how to access them.
> They don't look to be available in from the template
lokking at it more carefully I see :
identity is missing
maybe something like :
identity = request.environ.get('repoze.who.identity')
should do the trick, and maybe a bug :
tg_vars = Bunch(
selector=selector,
ipeek=ipeek,
cycle=cycle,
quote_plus=quote_plus,
checker=checker,
url = tg.controllers.url,
session=session,
config=config,
locale = tg.request.accept_language.best_matches(),
errors = getattr(tmpl_context, "form_errors", {}),
inputs = getattr(tmpl_context, "form_values", {}),
request = tg.request)
root_vars = {}
root_vars.update({'tg':'tg_vars'})
maybe last line should be
root_vars.update({'tg':tg_vars})
without quote ?
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" 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/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---