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
18b6c253
Commit
18b6c253
authored
Jan 24, 2012
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed the partials argument from the View constructor.
parent
87deeab9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
14 deletions
+2
-14
pystache/view.py
+2
-14
No files found.
pystache/view.py
View file @
18b6c253
...
@@ -52,24 +52,13 @@ class View(object):
...
@@ -52,24 +52,13 @@ class View(object):
locator
=
TemplateLocator
()
locator
=
TemplateLocator
()
def
__init__
(
self
,
context
=
None
,
partials
=
None
):
def
__init__
(
self
,
context
=
None
):
"""
"""
Construct a View instance.
Construct a View instance.
Arguments:
partials: a custom object (e.g. dictionary) responsible for
loading partials during the rendering process. The object
should have a get() method that accepts a string and returns
the corresponding template as a string, preferably as a
unicode string. The method should return None if there is
no template with that name, or raise an exception.
"""
"""
context
=
Context
.
create
(
self
,
context
)
context
=
Context
.
create
(
self
,
context
)
self
.
_partials
=
partials
self
.
context
=
context
self
.
context
=
context
def
_get_renderer
(
self
):
def
_get_renderer
(
self
):
...
@@ -79,8 +68,7 @@ class View(object):
...
@@ -79,8 +68,7 @@ class View(object):
# instantiation some of the attributes on which the Renderer
# instantiation some of the attributes on which the Renderer
# depends. This lets users set the template_extension attribute,
# depends. This lets users set the template_extension attribute,
# etc. after View.__init__() has already been called.
# etc. after View.__init__() has already been called.
renderer
=
Renderer
(
partials
=
self
.
_partials
,
renderer
=
Renderer
(
file_encoding
=
self
.
template_encoding
,
file_encoding
=
self
.
template_encoding
,
search_dirs
=
self
.
template_path
,
search_dirs
=
self
.
template_path
,
file_extension
=
self
.
template_extension
)
file_extension
=
self
.
template_extension
)
self
.
_renderer
=
renderer
self
.
_renderer
=
renderer
...
...
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