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

Better formatting of version string.

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