aboutsummaryrefslogtreecommitdiffstats
path: root/packages/torouter-web
diff options
context:
space:
mode:
authorArturo FilastoĢ€ <hellais@torproject.org>2011-08-11 18:25:24 +0200
committerArturo FilastoĢ€ <hellais@torproject.org>2011-08-11 18:25:24 +0200
commitdb774cfe565e40a7ce4def89c130f69540493bf1 (patch)
tree75f6a21b3462038976e74d9cec7aa21527b8b194 /packages/torouter-web
parent423d7556b1af6159bc3a1d6219bcd0ec704dce7f (diff)
downloadtorouter-db774cfe565e40a7ce4def89c130f69540493bf1.tar.gz
torouter-db774cfe565e40a7ce4def89c130f69540493bf1.zip
Add some comments
Diffstat (limited to 'packages/torouter-web')
-rw-r--r--packages/torouter-web/config.py1
-rw-r--r--packages/torouter-web/runui.py2
-rw-r--r--packages/torouter-web/view.py1
3 files changed, 4 insertions, 0 deletions
diff --git a/packages/torouter-web/config.py b/packages/torouter-web/config.py
index aff1f8b..765c3df 100644
--- a/packages/torouter-web/config.py
+++ b/packages/torouter-web/config.py
@@ -8,5 +8,6 @@ cache = False
globals = {}
+# Add your own (username, password) pair
authinfo = ("test", "test")
diff --git a/packages/torouter-web/runui.py b/packages/torouter-web/runui.py
index 9b33d7a..030bf91 100644
--- a/packages/torouter-web/runui.py
+++ b/packages/torouter-web/runui.py
@@ -10,6 +10,7 @@ from tui.utils import session
from view import render
+# This is the main structure of URLs
urls = (
'/', 'tui.controllers.main.index',
# '/config/(tor|router)', 'tui.controllers.main.config',
@@ -26,6 +27,7 @@ urls = (
if __name__ == "__main__":
app = web.application(urls, globals())
+ # Add session management to the app
session.add_session_to_app(app)
app.internalerror = web.debugerror
app.run()
diff --git a/packages/torouter-web/view.py b/packages/torouter-web/view.py
index 639415a..f4c9b39 100644
--- a/packages/torouter-web/view.py
+++ b/packages/torouter-web/view.py
@@ -5,6 +5,7 @@ t_globals = dict(
datestr=web.datestr,
)
+# create the render object
render = web.template.render('tui/views', cache=config.cache, globals=t_globals)
render._keywords['globals']['render'] = render