diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/torouter-web/src/runui.py | 2 | ||||
-rw-r--r-- | packages/torouter-web/src/tui/config.py | 17 | ||||
-rw-r--r-- | packages/torouter-web/src/tui/view.py | 11 |
3 files changed, 29 insertions, 1 deletions
diff --git a/packages/torouter-web/src/runui.py b/packages/torouter-web/src/runui.py index 43d8943..d5c7c9e 100644 --- a/packages/torouter-web/src/runui.py +++ b/packages/torouter-web/src/runui.py @@ -8,7 +8,7 @@ from tui import config import tui.controllers from tui.utils import session -from view import render +from tui.view import render # This is the main structure of URLs diff --git a/packages/torouter-web/src/tui/config.py b/packages/torouter-web/src/tui/config.py new file mode 100644 index 0000000..f3f8dcc --- /dev/null +++ b/packages/torouter-web/src/tui/config.py @@ -0,0 +1,17 @@ +# tui, Tor web UI +# by Arturo Filasto' <hellais@torproject.org> +# + +import web, os + +cache = False + +globals = {} + +# Add your own (username, password) pair +authinfo = ("test", "test") + +interfaces_file = os.getcwd() + "/../../torouter-prep/configs/interfaces" +#torrc_file = os.getcwd() + "/../../torouter-prep/configs/torrc" +torrc_file = "/tmp/torrc" + diff --git a/packages/torouter-web/src/tui/view.py b/packages/torouter-web/src/tui/view.py new file mode 100644 index 0000000..0252ad8 --- /dev/null +++ b/packages/torouter-web/src/tui/view.py @@ -0,0 +1,11 @@ +import web +from tui import config + +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 + |