diff options
-rw-r--r-- | packages/torouter-web/config.py | 1 | ||||
-rw-r--r-- | packages/torouter-web/runui.py | 2 | ||||
-rw-r--r-- | 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 |