Commit c879a9a3 authored by Jacek Lebioda's avatar Jacek Lebioda
Browse files

Merge branch '20-set-the-year-automatically' into 'master'

feat: generate current year for index page

Closes #20

See merge request elixir/elixir-beacon!13
parents dc53d79c 3c1ee0b2
Pipeline #29736 passed with stage
in 59 seconds
from datetime import datetime
from flask import jsonify, render_template, request, redirect, session
from flask_cors import cross_origin
......@@ -13,6 +15,11 @@ logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)
def get_current_year():
year = datetime.now().year
return str(year)
def register_views(app,
the_beacon: Beacon):
"""
......@@ -31,9 +38,11 @@ def register_views(app,
@app.context_processor
def inject_values():
"""Will inject `is_logged_in` property to all templates"""
current_year = '2020'
values = {
'is_logged_in': oidc.user_loggedin,
'root': API_PREFIX
'root': API_PREFIX,
'current_year': get_current_year()
}
return values
......
......@@ -249,7 +249,7 @@
<div class="row">
<footer class="footer">
<p>&copy; LCSB, 2018 - 2020; <span class="warning">By using this application, you agree to abandon any attempt to re-identify individuals represented in the query results.</span>
<p>&copy; LCSB, 2018 - {{ current_year }}; <span class="warning">By using this application, you agree to abandon any attempt to re-identify individuals represented in the query results.</span>
</p>
<div id="lap-cookies-banner">
......
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