Commit 5d4d24da authored by Guillaume Mella's avatar Guillaume Mella
Browse files

show version and start date

parent d998ad7d
from datetime import datetime
import os
from pyramid.config import Configurator
from pyramid.session import SignedCookieSessionFactory
......@@ -12,6 +15,18 @@ def main(global_config, **settings):
return None
session_factory = SignedCookieSessionFactory(secret)
# Startup timestamp
date_now = str(
config.registry.settings['jmdc.start'] = date_now
# Startup version
v = os.environ['IMAGE_TAG']
v="IMAGE_TAG undefined"
config.registry.settings['jmdc.version'] = v
{% extends "jmdc-main.jinja2" %}
{% block content %}
<h1>Collaborative JMDC catalog service</h1>
<h1>Collaborative JMDC catalog service</h1>
<p>Please contact the <a href="">JMMC user support</a> for any remark or issue on this service.</p>
<h2>Release notes</h2>
<h2>Release notes</h2>
<em>Start date:</em> <b>{{ start_date }}</b> </code>
<em>Version:</em> <b>{{ version }}</b> </code>
<li>V.TBD - July 2019
......@@ -17,12 +23,11 @@
<li>Provide a single record submission form</li>
......@@ -4,6 +4,7 @@ from pyramid.view import view_config
@view_config(route_name='jmdc_about', renderer='../templates/jmdc_about.jinja2')
def jmdc_about(request):
session = request.dbsession
return { }
return {
'start_date': request.registry.settings['jmdc.start'],
'version': request.registry.settings['jmdc.version']
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