mirror of
https://github.com/kennethreitz-archive/pystache.git
synced 2026-06-05 23:40:16 +00:00
16 lines
379 B
Python
16 lines
379 B
Python
import pystache
|
|
|
|
class TemplatePartial(pystache.View):
|
|
template_path = 'examples'
|
|
|
|
def title(self, text):
|
|
return "Welcome"
|
|
|
|
def title_bars(self, text):
|
|
return '-' * len(self.title('derp'))
|
|
|
|
def looping(self, text):
|
|
return [{'item': 'one'}, {'item': 'two'}, {'item': 'three'}]
|
|
|
|
def thing(self, text):
|
|
return self['prop'] |