# # # patch "www/viewmtn/config.py.example" # from [7627e154e30ee6e88e547312876aa5cca8bf7c7e] # to [568410d2d3494cf5a4c21f6d1d2f5f446ec1cb3d] # ============================================================ --- www/viewmtn/config.py.example 7627e154e30ee6e88e547312876aa5cca8bf7c7e +++ www/viewmtn/config.py.example 568410d2d3494cf5a4c21f6d1d2f5f446ec1cb3d @@ -16,9 +16,12 @@ # in .htaccess. import sys +import os -# the base URL of this install -base_url = 'http://localhost/~grahame/viewmtn/' +# the base URL of this install 'http://%s%s/' % (req.hostname, os.path.dirname(req.uri))# +def base_url(uri): + d = os.path.dirname(os.path.dirname(uri)) + return 'http://servername/webhost/projects/%s/viewmtn/' % os.path.basename(d) # the path to the 'monotone' binary monotone = '/opt/monotone/bin/monotone' @@ -27,10 +30,12 @@ # obviously, everything in this database might # become public if something goes wrong; probably # a good idea not to leave your private key in it -dbfile = '/path/to/monotone.db' +def dbfile(uri): + d = os.path.dirname(os.path.dirname(uri)) + return '/webhost-install-dir/projects/%s/database.viewmtn' % os.path.basename(d) # where to find GNOME icons (used in manifest listing) -gnome_mimetype_icon_path = '/path/to/share/icons/gnome/' +gnome_mimetype_icon_path = '/usr/share/icons/gnome/' # and where they are on the web gnome_mimetype_uri = 'mimetypes/' @@ -43,7 +48,7 @@ # in which viewmtn can output graph files # (you should set up a cronjob to delete old ones # periodically) - 'directory' : '/path/to/graph/directory', + 'directory' : '/var/viewmtn-graphs', # a URL, relative or absolute, at which the files # in the 'graphdir' directory can be found. Should