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

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)
config.set_session_factory(session_factory)
# Startup timestamp
date_now = str(datetime.now())
config.registry.settings['jmdc.start'] = date_now
# Startup version
try:
v = os.environ['IMAGE_TAG']
except:
v="IMAGE_TAG undefined"
config.registry.settings['jmdc.version'] = v
config.include('pyramid_mailer')
config.include('.models')
config.include('pyramid_jinja2')
......
{% extends "jmdc-main.jinja2" %}
{% block content %}
<h1>Collaborative JMDC catalog service</h1>
<h1>Collaborative JMDC catalog service</h1>
<p>Please contact the <a href="http://www.jmmc.fr/support">JMMC user support</a> for any remark or issue on this service.</p>
<h2>Release notes</h2>
<h2>Release notes</h2>
<p>
<em>Start date:</em> <b>{{ start_date }}</b> </code>
<em>Version:</em> <b>{{ version }}</b> </code>
</p>
<div>
<ul>
<li>V.TBD - July 2019
......@@ -17,12 +23,11 @@
</ul>
</div>
<h2>Backlog</h2>
<h2>Backlog</h2>
<div>
<ul>
<ul>
<li>Provide a single record submission form</li>
</ul>
</ul>
</div>
......
......@@ -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