Package: pyramid-jinja2
Jinja2 bindings for PyramidThese are bindings for theJinja2 templating systemfor thePyramidweb framework.Seehttps://docs.pylonsproject.org/projects/pyramid-jinja2/en/latest/for
documentation orindex.rstin thedocssub-directory of the source
distribution.2.10.1 (2023-02-07)Rename “master” git branch to “main”Add Python 3.11 and 3.12 support.Replace usage of private Pyramid APIs.2.10 (2022-03-27)Addjinja2.i18n_extensionconfiguration setting.
Seehttps://github.com/Pylons/pyramid_jinja2/pull/1652.9.2 (2022-03-19)Support Jinja2 >= 3.0.Only importjinja2.pass_contextif available on Jinja2 >= 3.0, otherwise
fallback tojinja2.contextfilter.
Seehttps://github.com/Pylons/pyramid_jinja2/pull/1642.9.1 (2022-03-12)This release has been yanked and is no longer available.Fix package metadata. No changes from 2.9.2.9 (2022-03-12)This release has been yanked and is no longer available.Drop Python 3.6 support.Add Python 3.9 and 3.10 support.Refactor project structure to make wheel distribution smaller.Blackify the codebase.Use the newer@jinja2.pass_contextin favor of the deprecated@jinja2.contextfilter.
Seehttps://github.com/Pylons/pyramid_jinja2/pull/1592.8 (2019-01-25)Drop Python 3.3 support.Add Python 3.6 and 3.7 support.Support themappingargument in the injectedgettextfunction.
Seehttps://github.com/Pylons/pyramid_jinja2/pull/1432.7 (2016-11-15)Drop Python 2.6 and 3.2 support.Add Python 3.5 support.#123: Switch to pytest and pip for testing and installation in the
documentation and scaffold. nose and coverage are still used in the core
pyramid_jinja2 package [stevepiercy].Preferresource_urlover deprecatedmodel_url. Pyramid has changed
its vocabulary, so let’s reflect the changes. [Mikko Ohtamaa]Support a dotted path to a gettext wrapper for thejinja2.i18n.gettextsetting. [mmerickel]2.6.2 (2016-01-23)Officially drop support for Python 3.2, test under Python 3.5 and pypy3
[Domen Kozar]2.6.1 (2016-01-20)Don’t include .pyc in wheel file [Domen Kozar]2.6 (2016-01-20)#116: Update scaffold to be consistent with Pyramid’s default scaffolds
[stevepiercy]2.5 (2015-04-16)#106: Allow specifying a custom pyramid_jinja.i18n.GetTextWrapper [dstufft]2.4 (2015-03-27)#105: Supportjinja2.finalizeconfiguration setting. [dstufft]#94: Fix loading of templates with relative names on Windows [zart]Support Python 3.4 [mmerickel]Improve scaffold [marioidival]#98: Avoid get_current_request where possible [housleyjk]#99: Add resource_path filter [javex]2.3.3 (2014-07-02)#91: Fix a recursion error while attempting to include a template with the
same name as one of the parents that was already loaded. [mmerickel]2.3.2 (2014-06-13)Fix 2.3.1 brownbag release. It had some erroneous didn’t-mean-to-push
changes that are now solved. Brought coverage back up to 100%.2.3.1 (2014-06-13)Improve the template-relative searchpath logic to search more possibilities
in the include-chain built up from templates including or extending
other templates. The logic for when the chain was longer than just one
template including another template was broken.2.3 (2014-05-30)Requirepyramid_jinja2to be included even when usingpyramid_jinja2.renderer_factory. It is now a thin wrapper around the
default renderer and can be used to share the same settings with another
file extension. [mmerickel]Backward Incompatible Changespyramid_jinja2mustbe included into theConfiguratorin order
to usepyramid_jinja2.renderer_factoryotherwise you may see the
exception:ValueError: As of pyramid_jinja2 2.3, the use of the
"pyramid_jinja2.renderer_factory" requires that pyramid_jinja2 be
configured via config.include("pyramid_jinja2") or the equivalent
"pyramid.includes" setting.The fix is to includepyramid_jinja2:config.include("pyramid_jinja2")2.2 (2014-05-30)#88: Formalize template loading order and allow all lookups to fallback to
the search path. A template is now always searched for relative to its
parent template. If not found, the lookup will fallback to the search path.
[mmerickel]Addprependoption toconfig.add_jinja2_search_pathto allow
prepending of paths to the beginning of the search path if a path should
override previously defined paths. [mmerickel]2.1 (2014-05-16)The 2.0 series started adding the package that invokedconfig.add_jinja2_rendererto the template search path. This is
being removed in favor of explicit search paths and will hopefully not
affect many people as it has only been available for a couple weeks. The
only automatic search path left is the one added by the default.jinja2renderer created when includingpyramid_jinja2. [mmerickel]Adjust theconfig.include("pyramid_jinja2")to add any packages fromjinja2.directoriesbeforethe default search path at the base of
the app. Previously there was no way to override that search path.
[mmerickel]2.0.2 (2014-05-06)The path of the child template is always considered when inheriting from
a base template. Therefore when doingrender("templates/foo.jinja2")andfoo.jinja2has an{% extends "base.jinja2" %}, the template
will be searched for as"templates/base.jinja2"on the search path.
Previously the path of the child template was ignored when doing the
lookup for the base, causing some very subtle and unrecoverable lookup
errors when the child template was found relative to the caller instead
of being found on the search path. [mmerickel]This release restores the default search path behaviors from the 1.x series
that were inadvertently removed in the 2.x. The project’s root package is
added to the search path by default. [mmerickel]2.0.1 (2014-04-23)#86: Fix a regression caused by the new support for extending a template
relative to itself. Using{% extends "some_asset:spec.jinja2" %}was
no longer working and is now fixed. [mmerickel]2.0 (2014-04-21)Claim Python 3.4 support
[mmerickel]#75: Fix the missing piece of relative template loading by allowing a
template to inherit from a template relative to itself, instead of
forcing the parent to be on the search path.
[mmerickel]#73: Added a newconfig.add_jinja2_rendererAPI that can create and
override multiple Jinja2 renderers, each loaded using potentially different
settings and extensions.The other APIs are now keyed on the renderer extension, as each extension
may have different settings. Thusconfig.add_jinja2_search_path,config.add_jinja2_extension, andconfig.get_jinja2_environmentaccept anameargument, which defaults to.jinja2.This deprecates the oldpyramid_jinja2.renderer_factorymechanism
for adding renderers with alternate extensions.Configuration of the renderers has been updated to follow Pyramid’s
standard mechanisms for conflict detection. This means that if two modules
both try to add a renderer for the.jinja2extension, they may raise a
conflict or the modifications made by the invocation closest to theConfiguratorin the call-stack will win. This behavior can be affected
by callingconfig.commitat appropriate times to force a configuration
to take effect immediately. As such, configuration is deferred until
commit-time, meaning that it is now possibleconfig.get_jinja2_environmentwill returnNonebecause the changes
have not yet been committed.
[mmerickel]Backward Incompatible ChangesThe creation and configuration of the Jinja2Environmentis now deferred
until commit-type in the PyramidConfigurator. This means thatconfig.get_jinja2_environmentmay returnNone. To resolve this,
invokeconfig.commit()before attempting to get the environment.1.10 (2014-01-11)#77: Change semantics ofjinja2.bytecode_cachingsetting.  The new
default is false (no bytecode caching) –bytecode_cachingmust
explicitly be set to true to enable a filesystem bytecode cache.
In addition, an atexit callback to clean the cache is no longer
registered (as this seemed to defeat most of the purpose of having
a bytecode cache.)  Finally, a more complex bytecode cache may be
configured by settingjinja2.bytecode_cachingdirectly to ajinja2.BytecodeCacheinstance.  (This can not be done in a
paste .ini file, it must be done programatically.)
[dairiki]prevent error when usingpython setup.py bdist_wheel[msabramo]1.9 (2013-11-08)fix indentation level for Jinja2ProjectTemplate in scaffolds/__init__.py
[Bruno Binet]Remove unnecessary dependency onpyramid.interfaces.ITemplateRendererwhich was deprecated in Pyramid 1.5.
[mmerickel]#68: Addedmodel_path_filter,route_path_filterandstatic_path_filterfilters
[Remco]#74: Fixed issue with route being converted as_const by jinja2 engine when using btyecode cache
[Remco]1.8 (2013-10-03)#70: Do not pin for py3.2 compatibility unless running under py3.2
[dairiki]1.7 (2013-08-07)#56: python3.3: Non-ASCII characters in changelog breaks pip installation
[Domen Kozar]#57: Remove useless warning:DeprecationWarning: reload_templates setting
is deprecated, use pyramid.reload_templates instead.[Marc Abramowitz]1.6 (2013-01-23)Setjinja2.i18n.domaindefault to the package name
of the pyramid application.
[Domen Kozar]Addjinja2.globalssetting to add global objects into
the template context
[Eugene Fominykh]Addjinja2.newstylesetting to enable newstyle gettext calls
[Thomas Schussler]1.5 (2012-11-24)Addpyramid.reload_templatesto setjinja2.auto_reloadinstead of
usingreload_templates. Deprecate the latter.
[Domen Kozar]Clear bytecode cache on atexit
[Domen Kozar]Add support for more Jinja2 options. Note support for jinja2.autoescape is
limited to boolean only.jinja2.block_start_stringjinja2.block_end_stringjinja2.variable_start_stringjinja2.variable_end_stringjinja2.comment_start_stringjinja2.comment_end_stringjinja2.line_statement_prefixjinja2.line_comment_prefixjinja2.trim_blocksjinja2.newline_sequencejinja2.optimizedjinja2.cache_sizejinja2.autoescape[Michael Ryabushkin]1.4.2 (2012-10-17)Addjinja2.undefinedsetting to change handling of undefined types.
[Robert Buchholz]Remove redundant decoding error handling
[Domen Kozar]Configure bytecode caching by default. Introducejinja2.bytecode_cachingandjinja2.bytecode_caching_directorysettings.
[Domen Kozar]Allow to add custom Jinja2 tests injinja2.testssetting.
[Sebastian Kalinowski]1.4.1 (2012-09-12)Fix brown-bag release
[Domen Kozar]1.4 (2012-09-12)Correctly resolve relative search paths passed toadd_jinja2_search_pathandjinja2.directories[Domen Kozar]#34: Don’t recreatejinja2.Environmentforadd_jinja2_extension[Domen Kozar]Drop Python 2.5 compatibility
[Domen Kozar]Addition ofstatic_urlfilter.Adddevanddocssetup.py aliases (ala Pyramid).Changed template loading relative to package calling the renderer so
it works like the Chameleon template loader.1.3 (2011-12-14)Make scaffolding compatible with Pyramid 1.3a2+.1.2 (2011-09-27)Make tests pass on Pyramid 1.2dev.Make compatible with Python 3.2 (requires Pyramid 1.3dev+).1.1 (2011-07-24)Addget_jinja2_environmentdirective.Add all configurator directives to documentation.1.0 (2011-05-12)Message domain can now be specified withjinja2.i18n.domainfor i18nPaster template now sets up starter locale pot/po/mo filespyramid_jinja2 now depends on Jinja2 >= 2.5.0 due tojinja2.Environment.install_gettext_callablesusehttps://github.com/Pylons/pyramid_jinja2/pull/21Added demo app just to visualize i18n work0.6.2 (2011-04-06)jinja2.ext.i18nis now added by default, seei18n.rstfor detailsAddedadd_jinja2_extensiondirective to the ConfiguratorUpdated jinja2.extensions parsing mechanismFixed docs to indicate using asset: prefix is no longer necessary0.6.1 (2011-03-03)Asset-based loading now takes precedance and does not require
“asset:” prefixFixed the “current” package mechanism of asset: loading so that
it more accurately finds the current packageDependency onpyramid_zcmlremoved.0.6 (2011-02-15)Documentation overhauled.Templates can now be looked up by asset spec completely bypassing
the search path by specifying a prefix ofasset:.Updated paster template to more closely relate to changes made
to paster templmates in Pyramid core.Add new directiveadd_jinja2_search_pathto the configurator
whenincludemeis used.0.5 (2011-01-18)Addincludemefunction (meant to be used viaconfig.include).Fix documentation bug related topaster createreported athttps://github.com/Pylons/pyramid_jinja2/issues/12Depend upon Pyramid 1.0a10 + (to make ZCML work).0.4 (2010-12-16)Paster TemplateChanges to normalize with default templates shipping with Pyramid core:
remove calls toconfig.begin()andconfig.end()from__init__.main, entry point name changed tomain, entry__init__.pyfunction name changed tomain, depend on WebError, usepaster_pluginsargument to setup function in setup.py, depend on
Pyramid 1.0a6+ (useconfigrather thanconfigurator).TestsUsetesting.setUpandtesting.tearDownrather than constructing a
Configurator (better fwd compat).FeaturesAddmodel_urlandroute_urlfilter implementations (and
documented).DocumentationUse Makefile which pulls in Pylons theme automagically.0.3 (2010-11-26)Addjinja2.filtersandjinja2.extensionssettings (thanks to
aodag).Document all known settings.0.2 (2010-11-06)Template autoreloading did not function, even ifreload_templateswas
set toTrue.0.1 (2010-11-05)First release.Notbackwards compatible withrepoze.bfg.jinja2: we
use a filesystem loader (the directories to load from come from thejinja2.directoriessetting).  No attention is paid to the current
package when resolving a renderer= line.