Skip to content
Myr

fix linkcheck issues

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by David Lord · parent f77b09d · Browse files · 7 files+24 added−25 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

7 files+24 added−25 removed

  • other:+24 added−25 removed

7 files+24 added−25 removed

modified:docs/api.rst+1 added-1 removed
112 unmodified lines
113>>> m.b114u'f\xf6\xf6'115116117.. _Unicode documentation: http://docs.python.org/dev/howto/unicode.html117.. _Unicode documentation: https://docs.python.org/3/howto/unicode.html118119High Level API120--------------121
802 unmodified lines
modified:docs/extensions.rst+4 added-4 removed
104 unmodified lines
105106The usage of the `i18n` extension for template designers is covered as part107:ref:`of the template documentation <i18n-in-templates>`.108109.. _gettext: http://docs.python.org/dev/library/gettext109.. _gettext: https://docs.python.org/3/library/gettext.html110.. _Babel: http://babel.pocoo.org/111112.. _newstyle-gettext:113
108 unmodified lines
222Example Extension223~~~~~~~~~~~~~~~~~224225The following example implements a `cache` tag for Jinja2 by using the226`Werkzeug`_ caching contrib module:226`cachelib`_ library:227228.. literalinclude:: cache_extension.py229 :language: python230231And here is how you use it in an environment::232233 from jinja2 import Environment234 from werkzeug.contrib.cache import SimpleCache234 from cachelib import SimpleCache235236 env = Environment(extensions=[FragmentCacheExtension])237 env.fragment_cache = SimpleCache()238
7 unmodified lines
246 ...247 </div>248 {% endcache %}249250.. _Werkzeug: http://werkzeug.pocoo.org/250.. _cachelib: https://github.com/pallets/cachelib251252Extension API253~~~~~~~~~~~~~254
87 unmodified lines
modified:docs/faq.rst+3 added-3 removed
24 unmodified lines
25speaking the performance of a template engine doesn't matter much as the26usual bottleneck in a web application is either the database or the application27code.2829.. _Mako: http://www.makotemplates.org/29.. _Mako: https://www.makotemplates.org/3031How Compatible is Jinja2 with Django?32-------------------------------------33
110 unmodified lines
144 from google.appengine.tools.devappserver2.python import sandbox145 sandbox._WHITE_LIST_C_MODULES += ['_ctypes', 'gestalt']146147Credit for this snippet goes to `Thomas Johansson148<http://stackoverflow.com/questions/3086091/debug-jinja2-in-google-app-engine/3694434#3694434>`_148<https://stackoverflow.com/questions/3086091/debug-jinja2-in-google-app-engine/3694434#3694434>`_149150Why is there no Python 2.3/2.4/2.5/3.1/3.2 support?151---------------------------------------------------152
34 unmodified lines
187templates passing information to the parent template. To avoid this188issue rename the macro or variable in the parent template to have an189uncommon prefix.190191.. _Jinja 1: http://jinja.pocoo.org/1/191.. _Jinja 1: https://pypi.org/project/Jinja/
modified:docs/integration.rst+3 added-3 removed
74 unmodified lines
75snippet and add it into your `config/environment.py`::7677 config['pylons.strict_c'] = True7879.. _Pylons: http://www.pylonshq.com/79.. _Pylons: https://pylonshq.com/8081TextMate82--------83
6 unmodified lines
90---9192A syntax plugin for `Vim`_ exists in the Vim-scripts directory as well as the93`ext` folder at the root of the Jinja2 project. `The script94<http://www.vim.org/scripts/script.php?script_id=1856>`_ supports Jinja1 and94<https://www.vim.org/scripts/script.php?script_id=1856>`_ supports Jinja1 and95Jinja2. Once installed two file types are available `jinja` and `htmljinja`.96The first one for text based templates, the latter for HTML templates.9798Copy the files into your `syntax` folder.99100.. _Babel: http://babel.pocoo.org/101.. _Vim: http://www.vim.org/101.. _Vim: https://www.vim.org/
modified:docs/intro.rst+8 added-8 removed
58 unmodified lines
59As an alternative to steps 4 you can also do ``python setup.py develop``60which will install the package via `distribute` in development mode. This also61has the advantage that the C extensions are compiled.6263.. _download page: http://pypi.python.org/pypi/Jinja264.. _distribute: http://pypi.python.org/pypi/distribute 65.. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools66.. _easy_install: http://peak.telecommunity.com/DevCenter/EasyInstall67.. _pip: http://pypi.python.org/pypi/pip68.. _git: http://git-scm.org/63.. _download page: https://pypi.org/project/Jinja2/64.. _distribute: https://pypi.org/project/distribute/65.. _setuptools: https://pypi.org/project/setuptools/66.. _easy_install: https://setuptools.readthedocs.io/en/latest/easy_install.html67.. _pip: https://pypi.org/project/pip/68.. _git: https://git-scm.com/697071MarkupSafe Dependency72~~~~~~~~~~~~~~~~~~~~~
1 unmodified line
74As of version 2.7 Jinja2 depends on the `MarkupSafe`_ module. If you75install Jinja2 via `pip` or `easy_install` it will be installed76automatically for you.7778.. _MarkupSafe: http://pypi.python.org/pypi/MarkupSafe78.. _MarkupSafe: https://markupsafe.palletsprojects.com/7980Basic API Usage81---------------82
33 unmodified lines
116in mind, so you will have to adapt the shown code examples to Python 3 syntax117for yourself.118119120.. _Jinja bug tracker: http://github.com/pallets/jinja/issues120.. _Jinja bug tracker: https://github.com/pallets/jinja/issues
modified:jinja2/bccache.py+2 added-3 removed
294 unmodified lines
295 the minimal interface required.296297 Libraries compatible with this class:298299 - `werkzeug <http://werkzeug.pocoo.org/>`_.contrib.cache300 - `python-memcached <http://www.tummy.com/Community/software/python-memcached/>`_301 - `cmemcache <http://gijsbert.org/cmemcache/>`_299 - `cachelib <https://github.com/pallets/cachelib>`_300 - `python-memcached <https://pypi.org/project/python-memcached/>`_301302 (Unfortunately the django cache interface is not compatible because it303 does not support storing binary data, only unicode. You can however pass304 the underlying cache client to the bytecode cache which is available
57 unmodified lines
modified:CHANGES.rst+3 added-3 removed
203 unmodified lines
204205- Prefix loader was not forwarding the locals properly to206 inner loaders. This is now fixed.207- Security issue: Changed the default folder for the filesystem cache to be208 user specific and read and write protected on UNIX systems. See `Debian bug209 734747`_ for more information.208 user specific and read and write protected on UNIX systems. See209 `Debian bug 734747`_ for more information.210211.. _Debian bug 734747: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734747211.. _Debian bug 734747: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734747212213Version 2.7.1214-------------215(bugfix release, released on August 7th 2013)
309 unmodified lines