aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/__init__.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-04-28 12:42:03 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-04-28 12:42:03 +1200
commitb4105be21e967f79d819749c44eff6ed4311f65d (patch)
tree723857cc38b59c5ebd35ab6c5b32d72e3a05c9a4 /libpathod/__init__.py
downloadmitmproxy-b4105be21e967f79d819749c44eff6ed4311f65d.tar.gz
mitmproxy-b4105be21e967f79d819749c44eff6ed4311f65d.tar.bz2
mitmproxy-b4105be21e967f79d819749c44eff6ed4311f65d.zip
Initial checkin.
Diffstat (limited to 'libpathod/__init__.py')
-rw-r--r--libpathod/__init__.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/libpathod/__init__.py b/libpathod/__init__.py
new file mode 100644
index 00000000..e841a6ab
--- /dev/null
+++ b/libpathod/__init__.py
@@ -0,0 +1,23 @@
+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),
+ ],
+ debug=True,
+ static_path = utils.data.path("static"),
+ template_path = utils.data.path("templates"),
+ )
+