mirror of
https://github.com/kennethreitz-archive/pystache.git
synced 2026-06-05 23:40:16 +00:00
c9dcb07630
Conflicts: examples/inverted.py pystache/template.py tests/test_pystache.py tests/test_view.py
29 lines
453 B
Python
29 lines
453 B
Python
import pystache
|
|
|
|
class Inverted(pystache.View):
|
|
template_path = 'examples'
|
|
|
|
def t(self):
|
|
return True
|
|
|
|
def f(self):
|
|
return False
|
|
|
|
def two(self):
|
|
return 'two'
|
|
|
|
def empty_list(self):
|
|
return []
|
|
|
|
def populated_list(self):
|
|
return ['some_value']
|
|
|
|
class InvertedLists(Inverted):
|
|
template_name = 'inverted'
|
|
|
|
def t(self):
|
|
return [0, 1, 2]
|
|
|
|
def f(self):
|
|
return []
|