Commit b30ae4a5 authored by Alan Mitchell's avatar Alan Mitchell
Browse files

Better formatting of version string.

parent 6fa403ee
......@@ -35,8 +35,10 @@
<h1>{% block title %}{% endblock %}</h1>
{% block content %}{% endblock %}
<p style="clear: both">&nbsp;</p>
<hr>
<hr />
<div id="footer">{{ bmsapp_footer|safe }}</div>
<hr />
<div>BMON Version: {{ version_date }}</div>
</div>
</div>
......
......@@ -322,6 +322,7 @@ def version_date_string():
"""
ver_date = ''
try:
# Need to move into directory where this code is located to execute Git command
dir_git = os.path.dirname(__file__)
result = check_output('cd %s; git log -n1' % dir_git, shell=True)
for lin in result.splitlines():
......
......@@ -27,9 +27,9 @@ DEFAULT_NAV_LINKS = ( ('Data Charts and Reports', 'reports', True),
TMPL_CONTEXT = {'bmsapp_title_text': getattr(settings, 'BMSAPP_TITLE_TEXT', 'Facility Monitoring'),
'bmsapp_header': getattr(settings, 'BMSAPP_HEADER', 'Facility Monitoring'),
'bmsapp_footer': getattr(settings, 'BMSAPP_FOOTER',
'Thanks to Alaska Housing Finance Corporation for providing most of the source code for this application.') + '<br>' + view_util.version_date_string(),
'bmsapp_footer': getattr(settings, 'BMSAPP_FOOTER', 'Thanks to Alaska Housing Finance Corporation for providing most of the source code for this application.'),
'bmsapp_nav_links': getattr(settings, 'BMSAPP_NAV_LINKS', DEFAULT_NAV_LINKS),
'version_date': view_util.version_date_string(),
}
def base_context():
......
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