Commit 27cd9ef9 by ichuang

minor change to allow github url to be overridden by metadata

parent 4240830e
...@@ -99,7 +99,8 @@ def add_histogram(get_html, module): ...@@ -99,7 +99,8 @@ def add_histogram(get_html, module):
# doesn't like symlinks) # doesn't like symlinks)
filepath = filename filepath = filename
data_dir = osfs.root_path.rsplit('/')[-1] data_dir = osfs.root_path.rsplit('/')[-1]
edit_link = "https://github.com/MITx/%s/tree/master/%s" % (data_dir,filepath) giturl = module.metadata.get('giturl','https://github.com/MITx')
edit_link = "%s/%s/tree/master/%s" % (giturl,data_dir,filepath)
else: else:
edit_link = False edit_link = False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment