# HG changeset patch # User David Soria Parra # Date 1394244213 0 # Node ID 4d4c4b73808e376786514383a1f804f6131120a1 # Parent 20cfd68e9c49e62e237b7f1349d8b5ae66d0d16d Use absolute paths diff -r 20cfd68e9c49 -r 4d4c4b73808e hgwebsite.py --- a/hgwebsite.py Fri Mar 07 16:08:01 2014 -0800 +++ b/hgwebsite.py Sat Mar 08 02:03:33 2014 +0000 @@ -18,7 +18,8 @@ def about(site=None): if not site: flask.abort(404) - tpath = os.path.join('templates', site, 'index.html') + root = os.path.dirname(os.path.abspath(__file__)) + tpath = os.path.join(root, 'templates', site, 'index.html') if not os.path.exists(tpath): flask.abort(404) t = os.path.join(site, 'index.html') diff -r 20cfd68e9c49 -r 4d4c4b73808e hgwebsite.wsgi --- a/hgwebsite.wsgi Fri Mar 07 16:08:01 2014 -0800 +++ b/hgwebsite.wsgi Sat Mar 08 02:03:33 2014 +0000 @@ -1,1 +1,3 @@ +import sys, os +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) from hgwebsite import app as application