You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a problem with template lookup and mod_wsgi. A template name seems to be always looked up in the current working directory first and there is nothing I can do about it. It's the first line of BaseTemplate.search().
As the current working directory under mod_wsgi could be anything it is easy to pick up wrong files. I have an index.html template in the views/ directory and adapted bottle.TEMPLATE_PATH. I get almost all templates from there but the index.html is picked up from /var/www/ and is of course not the template file I wanted to load.
Renaming the template is a workaround but IMHO not a good permanent solution.
The text was updated successfully, but these errors were encountered:
I'm working on a fix for this release and will change the behaviour completely in the next one. Templates should never be loaded from anywhere but the lookup directories.
fix#386: Response cookies cleared after redirect()
fix#389: Bottle still raises DeprecationWarning in bottle.redirect() and Router.match()
Fix#387: Template lookup found files in workdir, even if TEMPLATE_PATH did not contain '.'.
fix#382: "dictionary changed size during iteration" bug in test case.
…TH did not contain '.'.
The template path list is now obeyed (with an exception for templates with an explicit absolute path).
The next release will tighten the rules a bit further: TEMPLATE_PATH must not be empty, and absolute paths are
considered relative, too. This ensures that only templates from within TEMPLATE_PATH directries are loaded.
I have a problem with template lookup and
mod_wsgi
. A template name seems to be always looked up in the current working directory first and there is nothing I can do about it. It's the first line ofBaseTemplate.search()
.As the current working directory under
mod_wsgi
could be anything it is easy to pick up wrong files. I have anindex.html
template in theviews/
directory and adaptedbottle.TEMPLATE_PATH
. I get almost all templates from there but theindex.html
is picked up from/var/www/
and is of course not the template file I wanted to load.Renaming the template is a workaround but IMHO not a good permanent solution.
The text was updated successfully, but these errors were encountered: