commit db774cfe565e40a7ce4def89c130f69540493bf1 Author: Arturo Filastò hellais@torproject.org Date: Thu Aug 11 18:25:24 2011 +0200
Add some comments --- packages/torouter-web/config.py | 1 + packages/torouter-web/runui.py | 2 ++ packages/torouter-web/view.py | 1 + 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
tor-commits@lists.torproject.org