Skip to content
Myr

fixed linking in jinja docs for the intro

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

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 24b6558 · Browse files · 1 file+7 added−6 removed
This commit

State

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

Diff stats

1 file+7 added−6 removed

  • other:+7 added−6 removed

1 file+7 added−6 removed

modified:docs/intro.rst+7 added-6 removed
93 unmodified lines
9495Basic API Usage96---------------9798This section gives you a brief introduction to the Python API for Jinja2 templates.98This section gives you a brief introduction to the Python API for Jinja299templates.100101The most basic way to create a template and render it is through101:class:`Template`. This however is not the recommended way to work with it if102your templates are not loaded from strings but the file system or another data103source:102:class:`~jinja2.Template`. This however is not the recommended way to103work with it if your templates are not loaded from strings but the file104system or another data source:105106>>> from jinja2 import Template107>>> template = Template('Hello {{ name }}!')108>>> template.render(name='John Doe')109u'Hello John Doe!'110110By creating an instance of :class:`Template` you get back a new template111object that provides a method called :meth:`~Template.render` which when111By creating an instance of :class:`~jinja2.Template` you get back a new template112object that provides a method called :meth:`~jinja2.Template.render` which when113called with a dict or keyword arguments expands the template. The dict114or keywords arguments passed to the template are the so-called "context"115of the template.116
3 unmodified lines