summaryrefslogtreecommitdiff
path: root/jinja2/environment.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #673 from MrSenko/get_corresponding_lineno_tracebackDavid Lord2019-11-011-2/+4
|\ | | | | handle template.get_corresponding_lineno() for lines without debug info
| * Return empty list when debug_info is empty stringMr. Senko2017-01-291-2/+4
| |
* | compile writes utf8David Lord2019-10-281-7/+7
| |
* | creating a NativeTemplate creates a NativeEnvironmentnative-template-envDavid Lord2019-10-281-11/+18
| |
* | use "Jinja" instead of "Jinja2"David Lord2019-10-231-1/+1
| |
* | Fix typos (#815)luzpaz2018-02-181-1/+1
| | | | | | Found via `codespell -q 3` using v1.12.0.dev0
* | Lazy asyncsupport.patch_all()INADA Naoki2018-02-061-0/+2
| | | | | | | | fixes #765
* | Minor docstring grammar fix (#772)Eli Boyarski2017-09-181-1/+1
|/
* Bump up the copyright to 2017Armin Ronacher2017-01-071-1/+1
|
* Fix various optimizer bugs. This fixes #548bugfix/inline-optmiizeArmin Ronacher2017-01-061-4/+2
|
* Better error messages for some undefines. This fixes #575feature/no-localsArmin Ronacher2017-01-061-2/+12
|
* Support old-style classes for attribute lookups. Fixes #631Armin Ronacher2016-12-311-1/+1
|
* Make noopener the default for urlizeArmin Ronacher2016-12-311-1/+4
|
* Added note for async from filter callsArmin Ronacher2016-12-281-0/+5
|
* Made the env._async property public for filtersArmin Ronacher2016-12-281-2/+2
|
* Support the same set of loop functions for async modeArmin Ronacher2016-12-281-0/+18
|
* Improved wrapper code so that the API is more consistent on failureArmin Ronacher2016-12-281-0/+15
|
* Added tests for async functionality with imports and includesArmin Ronacher2016-12-281-4/+0
|
* Added untested support for imports and includes in async modeArmin Ronacher2016-12-281-0/+4
|
* Use more _get_default_module callsArmin Ronacher2016-12-281-1/+3
|
* First pass on implementing async default moduleArmin Ronacher2016-12-281-2/+8
|
* Stop use of .module in generated codeArmin Ronacher2016-12-281-4/+7
|
* Initial support for async renderingArmin Ronacher2016-12-281-1/+2
|
* Add async flagsArmin Ronacher2016-12-281-3/+12
|
* Change environment cache key constructionpgjones2016-05-211-1/+2
| | | | | | | | | 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.
* Change cache key definitiion in environmentpgjones2016-05-191-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* use double ticks for code in rstDavid Lord2016-05-021-5/+5
|
* Use constant name in doc (fixes #544)Raphael Boidol2016-05-011-1/+1
|
* Use partial(next, ...) instead get_next()Sebastian Noack2015-08-101-23/+23
|
* Let the Environment override the ContextThiefMaster2015-04-061-1/+5
| | | | closes #404
* Let the Environment override the CodeGeneratorThiefMaster2015-04-061-1/+5
| | | | see #404
* Fix doctestsMarkus Unterwaditzer2015-03-221-10/+9
| | | | Fix #427
* Typo Fixed.Abhishek Kumar Singh2015-03-071-1/+1
|
* Increased cache size to 400.Armin Ronacher2014-08-281-3/+6
|
* Merge pull request #293 from carldunham/docfixArmin Ronacher2014-06-061-1/+1
|\ | | | | fixed some typos and clarifying
| * fixed some typos and clarifyingCarl A Dunham2014-01-181-1/+1
| |
* | Make sure filtering returns a list for template listing.Armin Ronacher2014-06-061-1/+1
| |
* | Merge pull request #319 from richierichrawr/masterArmin Ronacher2014-06-061-7/+7
|\ \ | | | | | | Edit code comments for readability
| * | Edit code comments for readabilityrichierichrawr2014-04-051-7/+7
| |/ | | | | Changed a few things to make it more understandable
* | Style cleanups in environment and a tiny bugfix.Armin Ronacher2014-06-061-8/+9
| |
* | Fixed issue #309Armin Ronacher2014-06-061-1/+3
| |
* | better assignmentWing2014-05-171-1/+1
| |
* | check for if loader does not implement get_source()Wing2014-05-171-2/+6
| |
* | if template is not file, use name for cache keyWing2014-05-171-1/+4
| |
* | Update environment.pyWing2014-05-171-1/+1
| |
* | Update environment.pyWing2014-05-171-1/+1
| |
* | use abs path for cache keyWing2014-05-171-2/+4
|/
* Fixed a bug with call_filter not working properlyArmin Ronacher2013-07-041-2/+2
|
* Disable py_compile for Python 3 and pypyArmin Ronacher2013-05-201-8/+15
|
* More cleanup in the utils moduleArmin Ronacher2013-05-201-5/+5
|