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
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---