aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/__init__.py
blob: ff1b88f8efb753630caa0a25440d248f8d447f34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from tornado import web, template
import handlers, utils

class PathodApp(web.Application):
    def __init__(self, *args, **kwargs):
        self.templates = template.Loader(utils.data.path("templates"))
        web.Application.__init__(self, *args, **kwargs)


def application(**settings):
    return PathodApp(
                [
                    (r"/", handlers.Index),
                    (r"/log", handlers.Log),
                    (r"/help", handlers.Help),
                    (r"/preview", handlers.Preview),
                    (r"/p/.*", handlers.Pathod, settings),
                ],
                static_path = utils.data.path("static"),
                template_path = utils.data.path("templates"),
           )