Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflorent <florent.pigout@gmail.com>2011-08-28 00:02:26 (GMT)
committer florent <florent.pigout@gmail.com>2011-08-28 00:02:26 (GMT)
commitf29759ac7af129cef58e2e9f706530b15f05065e (patch)
treee5c38023d1d5718d17d38f756d0c406126031b44
parentb427000afab6b1e64015591f2fed1ba56ce81b99 (diff)
enhance url management
-rw-r--r--nutrinoweb/activity.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/nutrinoweb/activity.py b/nutrinoweb/activity.py
index 7722908..0ece4a7 100644
--- a/nutrinoweb/activity.py
+++ b/nutrinoweb/activity.py
@@ -16,7 +16,11 @@ from server import config
from server.flask import logger
-URL_BASE = 'http://localhost:5000/'
+# get port from config
+_port = config.Config().get('server>port', type_=int)
+_port = '5000' if _port is None or _port == '' else _port
+# ..
+URL_BASE = 'http://localhost:%s' % _port
def _toolbar_changed(toolbox, page, activity_):
@@ -56,7 +60,7 @@ class NutrinoWebActivity(run.Server, activity.Activity):
return self._toolbox
def change_screen(self, name):
- self.web_view.load_uri(URL_BASE + name)
+ self.web_view.load_uri('%s/%s' % (URL_BASE, name))
def __init_toolbar(self):
"""Keep an example of how to manage toolbar in our webapp ...