Commit 0b41209d by Chris Jerdonek

Improved the Renderer.render() docstring.

parent 96af7f72
...@@ -167,19 +167,19 @@ class Renderer(object): ...@@ -167,19 +167,19 @@ class Renderer(object):
""" """
Render the given template using the given context. Render the given template using the given context.
The return value is a unicode string, unless the output_encoding Returns:
attribute has been set to a non-None value, in which case the
return value has type str and is encoded using that encoding.
If the template string is not unicode, it is first converted to If the output_encoding attribute is None, the return value is
unicode using the default_encoding and decode_errors attributes. a unicode string. Otherwise, the return value is encoded to a
See the Template constructor's docstring for more information. string of type str using the output encoding named by the
output_encoding attribute.
Arguments: Arguments:
template: a template string that is either unicode, or of type template: a template string that is either unicode or of type str.
str and encoded using the encoding named by the default_encoding If the string has type str, it is first converted to unicode
keyword argument. using the default_encoding and decode_errors attributes of this
instance. See the constructor docstring for more information.
context: a dictionary, Context, or object (e.g. a View instance). context: a dictionary, Context, or object (e.g. a View instance).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment