diff --git a/bmsapp/view_util.py b/bmsapp/view_util.py index 6f9c688916812339b98cc3db8a0fe02d243d6c31..5db321a1a5d23db3d71eee9c4440bb8782513e69 100644 --- a/bmsapp/view_util.py +++ b/bmsapp/view_util.py @@ -2,6 +2,7 @@ Helper functions for the views in this BMS application. ''' import importlib +import os from subprocess import check_output from django.template import loader from django.templatetags.static import static @@ -321,7 +322,8 @@ def version_date_string(): """ ver_date = '' try: - result = check_output(['git', 'log', '-n1']) + dir_git = os.path.dirname(__file__) + result = check_output('cd %s; git log -n1' % dir_git, shell=True) for lin in result.splitlines(): if lin.startswith('Date:'): ver_date = lin[5:].strip()