Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor doc fixes. #69

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/templates.rst
Expand Up @@ -332,7 +332,7 @@ advantage of it, see :ref:`null-master-fallback`.

The filename of the template depends on the template loader. For example the
:class:`FileSystemLoader` allows you to access other templates by giving the
filename. You can access templates in subdirectories with an slash::
filename. You can access templates in subdirectories with a slash::

{% extends "layout/default.html" %}

Expand Down Expand Up @@ -571,6 +571,9 @@ by using `else`::
{% endfor %}
</ul>

Note that the `else` part works differently in ordinary Python where it
is executed when a `break` happened, which is not possible here.

It is also possible to use loops recursively. This is useful if you are
dealing with recursive data such as sitemaps. To use loops recursively you
basically have to add the `recursive` modifier to the loop definition and
Expand Down Expand Up @@ -819,7 +822,7 @@ Jinja2 supports putting often used code into macros. These macros can go into
different templates and get imported from there. This works similar to the
import statements in Python. It's important to know that imports are cached
and imported templates don't have access to the current template variables,
just the globals by defualt. For more details about context behavior of
just the globals by default. For more details about context behavior of
imports and includes see :ref:`import-visibility`.

There are two ways to import templates. You can import the complete template
Expand Down
2 changes: 1 addition & 1 deletion jinja2/filters.py
Expand Up @@ -557,7 +557,7 @@ def do_batch(value, linecount, fill_with=None):
A filter that batches items. It works pretty much like `slice`
just the other way round. It returns a list of lists with the
given number of items. If you provide a second parameter this
is used to fill missing items. See this example:
is used to fill up missing items. See this example:

.. sourcecode:: html+jinja

Expand Down