"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "docs/templating.rst" between
flask-1.1.1.tar.gz and flask-1.1.2.tar.gz

About: Flask is a lightweight Python WSGI web application framework.

templating.rst  (flask-1.1.1):templating.rst  (flask-1.1.2)
.. _templates: .. _templates:
Templates Templates
========= =========
Flask leverages Jinja2 as template engine. You are obviously free to use Flask leverages Jinja2 as its template engine. You are obviously free to use
a different template engine, but you still have to install Jinja2 to run a different template engine, but you still have to install Jinja2 to run
Flask itself. This requirement is necessary to enable rich extensions. Flask itself. This requirement is necessary to enable rich extensions.
An extension can depend on Jinja2 being present. An extension can depend on Jinja2 being present.
This section only gives a very quick introduction into how Jinja2 This section only gives a very quick introduction into how Jinja2
is integrated into Flask. If you want information on the template is integrated into Flask. If you want information on the template
engine's syntax itself, head over to the official `Jinja2 Template engine's syntax itself, head over to the official `Jinja2 Template
Documentation <http://jinja.pocoo.org/docs/templates/>`_ for Documentation <http://jinja.pocoo.org/docs/templates/>`_ for
more information. more information.
skipping to change at line 103 skipping to change at line 103
Importing with context looks like this: Importing with context looks like this:
.. sourcecode:: jinja .. sourcecode:: jinja
{% from '_helpers.html' import my_macro with context %} {% from '_helpers.html' import my_macro with context %}
Standard Filters Standard Filters
---------------- ----------------
These filters are available in Jinja2 additionally to the filters provided Flask provides the following Jinja2 filters in addition to the filters provided
by Jinja2 itself: by Jinja2 itself:
.. function:: tojson .. function:: tojson
:noindex: :noindex:
This function converts the given object into JSON representation. This This function converts the given object into JSON representation. This
is for example very helpful if you try to generate JavaScript on the is for example very helpful if you try to generate JavaScript on the
fly. fly.
.. sourcecode:: html+jinja .. sourcecode:: html+jinja
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)