Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pystache_custom
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pystache_custom
Commits
a855670a
Commit
a855670a
authored
Dec 20, 2011
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Plain Diff
Merge 'issue_57' into development: update docstrings and history notes.
parents
9bd65e82
dfeaac6d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
HISTORY.rst
+3
-0
pystache/template.py
+7
-2
No files found.
HISTORY.rst
View file @
a855670a
...
@@ -10,6 +10,9 @@ Features:
...
@@ -10,6 +10,9 @@ Features:
* A custom template loader can now be passed to a View. [cjerdonek]
* A custom template loader can now be passed to a View. [cjerdonek]
* Added a command-line interface. [vrde, cjerdonek]
* Added a command-line interface. [vrde, cjerdonek]
* Markupsafe can now be disabled after import. [cjerdonek]
* Markupsafe can now be disabled after import. [cjerdonek]
* Template class can now handle non-ascii characters in non-unicode strings.
Added default_encoding and decode_errors to Template constructor arguments.
[cjerdonek]
API changes:
API changes:
...
...
pystache/template.py
View file @
a855670a
...
@@ -68,8 +68,9 @@ class Template(object):
...
@@ -68,8 +68,9 @@ class Template(object):
Arguments:
Arguments:
template: a template string as a unicode string. Behavior is
template: a template string that is either unicode, or of type
undefined if the string has type str.
str and encoded using the encoding named by the default_encoding
keyword argument.
load_template: the function for loading partials. The function should
load_template: the function for loading partials. The function should
accept a single template_name parameter and return a template as
accept a single template_name parameter and return a template as
...
@@ -362,6 +363,10 @@ class Template(object):
...
@@ -362,6 +363,10 @@ class Template(object):
attribute has been set to a non-None value, in which case the
attribute has been set to a non-None value, in which case the
return value has type str and is encoded using that encoding.
return value has type str and is encoded using that encoding.
If the template string is not unicode, it is first converted to
unicode using the default_encoding and decode_errors attributes.
See the Template constructor's docstring for more information.
Arguments:
Arguments:
context: a dictionary, Context, or object (e.g. a View instance).
context: a dictionary, Context, or object (e.g. a View instance).
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment