summaryrefslogtreecommitdiff
path: root/examples/nested_context.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/nested_context.py')
-rw-r--r--examples/nested_context.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/nested_context.py b/examples/nested_context.py
index 59d816a..83565a1 100644
--- a/examples/nested_context.py
+++ b/examples/nested_context.py
@@ -11,9 +11,11 @@ class NestedContext(pystache.View):
def derp(self):
return [{'inner': 'car'}]
-
+
def herp(self):
return [{'outer': 'car'}]
-
+
def nested_context_in_view(self):
- return 'it works!' if self.get('outer') == self.get('inner') else '' \ No newline at end of file
+ if self.get('outer') == self.get('inner'):
+ return 'it works!'
+ return '' \ No newline at end of file