summaryrefslogtreecommitdiff
path: root/examples/inverted.py
blob: 660b9328e9559db4a24ddccda0372ab76ddb7137 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import pystache

class Inverted(pystache.View):
    template_path = 'examples'

    def t(self):
        return True

    def f(self):
        return False

    def two(self):
        return 'two'

class InvertedLists(Inverted):
    template_name = 'inverted'

    def t(self):
        return [0, 1, 2]

    def f(self):
        return []