From cd7927dbcaabf7958ccffb0e4daaaf2e9a0a9b08 Mon Sep 17 00:00:00 2001 From: Sean Finney Date: Tue, 24 Jun 2008 08:48:25 +0200 Subject: remove hardcoded url assumptions pagehandler now parses commands relative to Conf.root_url (which really should be called something else, like Conf.base_dir), allowing for both flexible subdir-based installs and vhost based installs. --- pagehandler.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'pagehandler.py') diff --git a/pagehandler.py b/pagehandler.py index 9fc6d9c..48d6cb4 100755 --- a/pagehandler.py +++ b/pagehandler.py @@ -14,17 +14,20 @@ from pygments.lexers import DiffLexer from pygments.formatters import HtmlFormatter class CmdHandler: - def __init__(self, req_uri): + def __init__(self, uri): + if len(uri)