From: Armin Ronacher Date: Mon, 26 May 2008 11:59:26 +0000 (+0200) Subject: fixed linking in jinja docs for the intro X-Git-Tag: 2.0rc1~14 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4dcc237b2b1ea137824c3047ea3cb1ff0ce9e17b;p=jinja2.git fixed linking in jinja docs for the intro --HG-- branch : trunk --- diff --git a/docs/intro.rst b/docs/intro.rst index abb8853..50ad8ab 100644 --- a/docs/intro.rst +++ b/docs/intro.rst @@ -95,20 +95,21 @@ snapshot:: Basic API Usage --------------- -This section gives you a brief introduction to the Python API for Jinja2 templates. +This section gives you a brief introduction to the Python API for Jinja2 +templates. The most basic way to create a template and render it is through -:class:`Template`. This however is not the recommended way to work with it if -your templates are not loaded from strings but the file system or another data -source: +:class:`~jinja2.Template`. This however is not the recommended way to +work with it if your templates are not loaded from strings but the file +system or another data source: >>> from jinja2 import Template >>> template = Template('Hello {{ name }}!') >>> template.render(name='John Doe') u'Hello John Doe!' -By creating an instance of :class:`Template` you get back a new template -object that provides a method called :meth:`~Template.render` which when +By creating an instance of :class:`~jinja2.Template` you get back a new template +object that provides a method called :meth:`~jinja2.Template.render` which when called with a dict or keyword arguments expands the template. The dict or keywords arguments passed to the template are the so-called "context" of the template.