Commit 65e8dc7c authored by Christophe Benz's avatar Christophe Benz

Display version number in footer

parent ddf0c0a2
## master
Non-breaking changes:
- display version number in footer
## 0.2.0 ## 0.2.0
New features for users: New features for users:
......
...@@ -4,6 +4,8 @@ from pathlib import Path ...@@ -4,6 +4,8 @@ from pathlib import Path
from setuptools import setup from setuptools import setup
from validata_ui.version import VERSION
# Gets the long description from the README.md file # Gets the long description from the README.md file
readme_filepath = Path(__file__).parent / 'README.md' readme_filepath = Path(__file__).parent / 'README.md'
with readme_filepath.open('rt', encoding='utf-8') as fd_in: with readme_filepath.open('rt', encoding='utf-8') as fd_in:
...@@ -12,7 +14,7 @@ with readme_filepath.open('rt', encoding='utf-8') as fd_in: ...@@ -12,7 +14,7 @@ with readme_filepath.open('rt', encoding='utf-8') as fd_in:
setup( setup(
name='validata_ui', name='validata_ui',
version='0.2.0', version=VERSION,
description='Validata Web UI', description='Validata Web UI',
long_description=LONG_DESCRIPTION, long_description=LONG_DESCRIPTION,
......
...@@ -14,6 +14,7 @@ import tableschema ...@@ -14,6 +14,7 @@ import tableschema
import opendataschema import opendataschema
from . import config from . import config
from .version import VERSION
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
...@@ -88,5 +89,10 @@ def urlencode(context, value): ...@@ -88,5 +89,10 @@ def urlencode(context, value):
return quote_plus(value) return quote_plus(value)
@app.context_processor
def inject_version():
return {"validata_ui_version": VERSION}
# Keep this import after app initialisation (to avoid cyclic imports) # Keep this import after app initialisation (to avoid cyclic imports)
from . import views # noqa isort:skip from . import views # noqa isort:skip
...@@ -74,19 +74,20 @@ ...@@ -74,19 +74,20 @@
</div> </div>
<footer class="footer hidden-print"> <footer class="footer hidden-print">
<div> <p>
Le service de validation du <a href="https://www.validata.fr/">projet Validata</a> Le service de validation du <a href="https://www.validata.fr/">projet Validata</a>
est mis à disposition par est mis à disposition par
<a href="http://www.opendatafrance.net/">OpenDataFrance</a> avec <a href="http://www.opendatafrance.net/">OpenDataFrance</a> avec
l'aide de <a href="https://jailbreak.paris">Jailbreak</a> l'aide de <a href="https://jailbreak.paris">Jailbreak</a>.
</div> </p>
<ul class="list-unstyled mt-4"> <p>
<p> <a href="/api/v1/apidocs" target="_blank">API</a>
<a href="/api/v1/apidocs" target="_blank">API</a> | <a href="https://git.opendatafrance.net/validata" target="_blank">Codes sources</a>
| <a href="https://git.opendatafrance.net/validata" target="_blank">Code source</a> | <a href="https://riot.im/app/#/room/#validata:jailbreak.paris" target="_blank">Salon de discussion public</a>
| <a href="https://riot.im/app/#/room/#validata:jailbreak.paris" target="_blank">Salon de discussion public</a> </p>
</p> <p class="text-muted">
</ul> (version <a href="https://git.opendatafrance.net/validata/validata-ui/tree/v{{ validata_ui_version }}" target="_blank">{{ validata_ui_version }}</a>)
</p>
</footer> </footer>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
......
VERSION = '0.2.0'
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