]> git.llucax.com Git - software/blitiri.git/blobdiff - blitiri.cgi
Apply os.path.realpath() to *_path config variables to support relative paths
[software/blitiri.git] / blitiri.cgi
index f08247ee827feb87032cd8b2ba92c7300486ce17..f13e59a5c0f03450d29fa5942007ebe7da4de0c7 100755 (executable)
@@ -50,6 +50,9 @@ import urllib
 import cgi
 from docutils.core import publish_parts
 
+# Before importing the config, add our cwd to the Python path
+sys.path.append(os.getcwd())
+
 # Load the config file, if there is one
 try:
        from config import *
@@ -57,6 +60,10 @@ except:
        pass
 
 
+# Pimp *_path config variables to support relative paths
+data_path = os.path.realpath(data_path)
+templates_path = os.path.realpath(templates_path)
+
 # Default template
 
 default_main_header = """