summaryrefslogtreecommitdiff
path: root/pystache
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-05-04 07:36:08 -0700
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-05-04 07:36:08 -0700
commit76c8caa09fe26d8d6c644761bd8f63d6f550ab49 (patch)
treed432d3b6a784baa781d28fee7c6e55ff0ff34ae0 /pystache
parentfe7f6511ce6e11915bf2485e3ec45cb6fcd28331 (diff)
downloadpystache-76c8caa09fe26d8d6c644761bd8f63d6f550ab49.tar.gz
Reordered the documentation in the Renderer.__init__() docstring.
Diffstat (limited to 'pystache')
-rw-r--r--pystache/renderer.py47
1 files changed, 23 insertions, 24 deletions
diff --git a/pystache/renderer.py b/pystache/renderer.py
index bed5ed1..0a6c2c1 100644
--- a/pystache/renderer.py
+++ b/pystache/renderer.py
@@ -56,6 +56,29 @@ class Renderer(object):
Arguments:
+ file_encoding: the name of the encoding to use by default when
+ reading template files. All templates are converted to unicode
+ prior to parsing. Defaults to the package default.
+
+ string_encoding: the name of the encoding to use when converting
+ to unicode any byte strings (type str in Python 2) encountered
+ during the rendering process. This name will be passed as the
+ encoding argument to the built-in function unicode().
+ Defaults to the package default.
+
+ decode_errors: the string to pass as the errors argument to the
+ built-in function unicode() when converting byte strings to
+ unicode. Defaults to the package default.
+
+ search_dirs: the list of directories in which to search when
+ loading a template by name or file name. If given a string,
+ the method interprets the string as a single directory.
+ Defaults to the package default.
+
+ file_extension: the template file extension. Pass False for no
+ extension (i.e. to use extensionless template files).
+ Defaults to the package default.
+
partials: an object (e.g. a dictionary) for custom partial loading
during the rendering process.
The object should have a get() method that accepts a string
@@ -68,10 +91,6 @@ class Renderer(object):
the file system -- using relevant instance attributes like
search_dirs, file_encoding, etc.
- decode_errors: the string to pass as the errors argument to the
- built-in function unicode() when converting str strings to
- unicode. Defaults to the package default.
-
escape: the function used to escape variable tag values when
rendering a template. The function should accept a unicode
string (or subclass of unicode) and return an escaped string
@@ -85,26 +104,6 @@ class Renderer(object):
consider using markupsafe's escape function: markupsafe.escape().
This argument defaults to the package default.
- file_encoding: the name of the default encoding to use when reading
- template files. All templates are converted to unicode prior
- to parsing. This encoding is used when reading template files
- and converting them to unicode. Defaults to the package default.
-
- file_extension: the template file extension. Pass False for no
- extension (i.e. to use extensionless template files).
- Defaults to the package default.
-
- search_dirs: the list of directories in which to search when
- loading a template by name or file name. If given a string,
- the method interprets the string as a single directory.
- Defaults to the package default.
-
- string_encoding: the name of the encoding to use when converting
- to unicode any strings of type str encountered during the
- rendering process. The name will be passed as the encoding
- argument to the built-in function unicode(). Defaults to the
- package default.
-
missing_tags: a string specifying how to handle missing tags.
If 'strict', an error is raised on a missing tag. If 'ignore',
the value of the tag is the empty string. Defaults to the