| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Changing from a tuple of the loader ID and template name to a weakref
to the loader and the template name should avoid situations whereby
the loader has changed, yet the cached templates are returned. This
would occur if the id of the new loader matches the old. A weakref is
preferred over a direct reference so that the loader can be garbaged
collected.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
In 6671b973e6de5abc46829a27fd3bbb989d68ca3a the load_template method
was altered to use a cache key other than the template name. The key
chosen was the abs path as returned from the loader get_source
method. Unless there is no path in which case the name is
used. Unfortunately this introduced a performance regression, #485, as
the get_source method (in the FileStoreLoader) loads the template
(causing IO).
The purpose of #332 was to allow the loader to change whilst ensuring
the correct template was loaded, i.e. to fix this case
env.loader = loader1
env.get_template('index.html') # return loader1/index.html
env.loader = loader2
env.get_template('index.html') # also return loader1/index.html because of cache
This commit changes the cache key to be a tuple of the id(loader) and
the template name. Therefore fixing the above case without calling the
get_source method and thereby avoiding the IO load.
A test has been added to ensure the above case works as expected, this
required a minor refactor of the caching tests.
|
| | |\ \ \
| | | | | |
| | | | | | |
Make title filter capitalize words inside parens and other brackets
|
| | | | | | |
|
| | |\ \ \ \
| | | | |_|/
| | | |/| | |
|
| | | | |/
| | | |/| |
|
| | | | |
| | | | |
| | | | |
| | | | | |
fix pytest warning, don't prefix non-testcase classes with Test
|
| | |/ / |
|
| |/ / |
|
|/ / |
|
|/ |
|
|
|
|
| |
closes #404
|
|
|
|
| |
see #404
|
|
|
|
|
| |
Remove py.test from setup.py install_requires
Rename testsuite folder to tests.
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
|
|
|
| |
doctests that just show usage that would not work on their own so that
they are standard code blocks now and do not disturb testing.
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
|
|
|
| |
This change makes ``{% if %}...{% endif %}`` a syntax error
now. (#364)
--HG--
branch : trunk
|
|
|
|
|
|
| |
--HG--
branch : trunk
extra : rebase_source : d8f677273490fa73d5603b68478fa3b54f60ccb9
|
|
|
|
|
|
|
|
| |
have an argument that is also used as local variable in an
inner frame [#360].
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
|
|
|
| |
and take the first that exists, if a list of templates is
given.
--HG--
branch : trunk
|
|
|
|
|
|
|
| |
is not consistenly implementable.
--HG--
branch : trunk
|
|
|
|
|
|
|
|
| |
triggered by multiple layers of local variables not tracked properly in if
statements.
--HG--
branch : trunk
|
|
|
|
|
|
|
|
|
|
| |
that exists since 2.0, code could depend on. See :ref:`jinja-scoping-bug`
for more information on this problem.
Tip is 2.3 as this will be the next release (will happen soon!)
--HG--
branch : trunk
|
|
|
|
|
|
|
| |
to be generated if set was used in if-blocks.
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
|
|
| |
marks code objects that are skipped on tracebacks. Also template errors are now translated as well to help the pylons debugger.
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
|
|
|
| |
variable and regular variable *after* the loop if that variable was unused
*before* the loop. (#331)
--HG--
branch : trunk
|
|
|
|
|
|
|
| |
that were unused in the callers frame (#327).
--HG--
branch : trunk
|
|
|
|
|
| |
--HG--
branch : trunk
|
|
|
|
|
|
|
|
|
| |
`{% call %}` tag inside loops.
This fixes #323.
--HG--
branch : trunk
|