Hi ,
here is the description for why it is happening like this
when you made a request to `/` index.py module is loaded and in this
module render is `templates/` and you are setting the template globals
render as this `render`
and when you made request to `/people/new` people module is loaded and in
this module render is `templates/people` and you are changing the template
*gloabals* render to this render...
and when you again go to `/` now the module doesn't loads again so it won't
change the template globals render........ and it in that with in
this(index) module render is `templates/` because of this when you are
printing render.loc() it is printing correctly and template globals render
is the one that got in the recent loaded module.
the same thing will happen if you go from people to favourites and then if
u load people apps it will give error..
On 11/4/07, 大郎 <[EMAIL PROTECTED]> wrote:
>
> in my apps: eg
> # favorites.py
> base = web.template.render('templates/', cache=settings.cache)
> render = web.template.render('templates/admin/favorite/', cache=
> settings.cache)
> web.template.Template.globals ['site']=settings.site
> web.template.Template.globals['base']=base
>
> #group.py
> base = web.template.render('templates/', cache=settings.cache)
> render = web.template.render('templates/admin/group/', cache=
> settings.cache)
> web.template.Template.globals['base']=base
> web.template.Template.globals['render']=render
>
> yes, that works, but in the app index.py, it not works sometimes:
> # index.py
> render = web.template.render('templates/', cache= settings.cache)
> web.template.Template.globals['render']=render
>
> when i visit the /index, it works, then visit others, and then visit
> /index, it debugs "no template named header", what happend?
> 3Q
> --
> 坚决要以貌取人!
> 最好的推广便是实际应用, 并加"powered by abc..."
> 找python虚拟主机
> http://groups.google.com/group/python-cn
> http://webpy.org
> http://twitter.com/qichangxing
> Gtalk: iexper(at)gmail.com
> >
>
--
ashok raavi
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---