Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OSUG
JMMC
jmmc-jmdcui-docker
Commits
5d4d24da
Commit
5d4d24da
authored
Feb 04, 2020
by
Guillaume Mella
Browse files
show version and start date
parent
d998ad7d
Changes
3
Hide whitespace changes
Inline
Side-by-side
jmdc-ui/jmdc_app/__init__.py
View file @
5d4d24da
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'
)
...
...
jmdc-ui/jmdc_app/templates/jmdc_about.jinja2
View file @
5d4d24da
{% 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>
...
...
jmdc-ui/jmdc_app/views/jmdc_about.py
View file @
5d4d24da
...
...
@@ -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'
]
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment