summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pystache/parser.py4
-rw-r--r--pystache/renderengine.py4
2 files changed, 6 insertions, 2 deletions
diff --git a/pystache/parser.py b/pystache/parser.py
index 4c37ec3..8dc74b5 100644
--- a/pystache/parser.py
+++ b/pystache/parser.py
@@ -189,10 +189,10 @@ class _SectionNode(object):
return _format(self, exclude=['delimiters', 'template'])
def render(self, engine, context):
- data = engine.fetch_section_data(context, self.key)
+ values = engine.fetch_section_data(context, self.key)
parts = []
- for val in data:
+ for val in values:
if callable(val):
# Lambdas special case section rendering and bypass pushing
# the data value onto the context stack. From the spec--
diff --git a/pystache/renderengine.py b/pystache/renderengine.py
index ef2c145..83cd24e 100644
--- a/pystache/renderengine.py
+++ b/pystache/renderengine.py
@@ -108,6 +108,10 @@ class RenderEngine(object):
return val
def fetch_section_data(self, context, name):
+ """
+ Fetch the value of a section as a list.
+
+ """
data = self.resolve_context(context, name)
# From the spec: