aboutsummaryrefslogtreecommitdiffstats
path: root/packages/torouter-web/src/tui
diff options
context:
space:
mode:
authorArturo FilastoĢ€ <hellais@torproject.org>2011-08-19 15:28:49 +0200
committerArturo FilastoĢ€ <hellais@torproject.org>2011-08-19 15:28:49 +0200
commit1a75c1e59305414d6ca543d2219c4089d014f7dc (patch)
tree62ae0c39496fe7550195f70c116d02e5d8d67788 /packages/torouter-web/src/tui
parent21472ffb02bb44782d232ce5efe79042c8cb27c6 (diff)
downloadtorouter-1a75c1e59305414d6ca543d2219c4089d014f7dc.tar.gz
torouter-1a75c1e59305414d6ca543d2219c4089d014f7dc.zip
Move to correct location config and view and fix import on runui
Diffstat (limited to 'packages/torouter-web/src/tui')
-rw-r--r--packages/torouter-web/src/tui/config.py17
-rw-r--r--packages/torouter-web/src/tui/view.py11
2 files changed, 28 insertions, 0 deletions
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
+