Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alexandre Bulté
validata-ui
Commits
ca21e5b6
Commit
ca21e5b6
authored
Dec 04, 2018
by
Christophe Benz
Browse files
Add external validators
parent
65be47ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
validata_ui/templates/base_template.html
View file @
ca21e5b6
...
...
@@ -9,6 +9,7 @@
<link
rel=
"shortcut icon"
href=
"{{ url_for('static', filename='img/favicon.ico')}}"
type=
"image/x-icon"
>
<!-- Bootstrap CSS -->
<link
rel=
"stylesheet"
href=
"{{url_for('static', filename='css/bootstrap.min.css')}}"
crossorigin=
"anonymous"
>
<link
rel=
"stylesheet"
href=
"https://use.fontawesome.com/releases/v5.5.0/css/all.css"
integrity=
"sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU"
crossorigin=
"anonymous"
>
<title>
Validata - {% block title %}{% endblock %}
</title>
...
...
validata_ui/templates/home.html
View file @
ca21e5b6
...
...
@@ -6,7 +6,9 @@
{% block content %}
<h1
class=
"my-4"
>
Validez vos jeux de données
</h1>
<div
class=
"row my-5"
>
<h2>
Validateurs
<span
abbr=
"Socle commun des données locales"
>
SCDL
</span></h2>
<div
class=
"row my-4"
>
{% for val in validators %}
<div
class=
"col-sm-4 col-md-3 mb-4"
>
<div
class=
"card text-center h-100"
>
...
...
@@ -19,4 +21,24 @@
</div>
{% endfor %}
</div>
<h2>
Validateurs externes
</h2>
<div
class=
"row my-4"
>
{% for val in external_validators %}
<div
class=
"col-sm-4 col-md-3 mb-4"
>
<div
class=
"card text-center h-100"
>
<div
class=
"card-body d-flex flex-column"
>
<h4
class=
"card-title"
>
{{ val.title }}
</h4>
<p
class=
"card-text"
>
{{ val.description }}
</p>
<a
href=
"{{ val.url }}"
class=
"btn btn-primary mt-auto"
target=
"_blank"
>
Voir
<i
class=
"fas fa-external-link-alt ml-1"
></i>
</a>
</div>
</div>
</div>
{% endfor %}
</div>
{% endblock %}
\ No newline at end of file
validata_ui/views.py
View file @
ca21e5b6
...
...
@@ -263,8 +263,25 @@ def bytes_data(f):
def
home
():
""" Home page """
validators
=
ValidatorHelper
.
schema_info_list
()
external_validators
=
[
{
"title"
:
"INSPIRE"
,
"description"
:
"proposé par la Commission Européenne pour tester des ressources géographiques (données, services ou métadonnées)"
,
"url"
:
"http://inspire-sandbox.jrc.ec.europa.eu/validator/"
},
{
"title"
:
"BAL"
,
"description"
:
"proposé par la mission Etalab pour tester des données Adresse produites localement (format BAL 1.1)"
,
"url"
:
"https://adresse.data.gouv.fr/bases-locales/validateur"
},
{
"title"
:
"CVDTC"
,
"description"
:
"proposé par l'AFIMB dans le cadre du projet Chouette pour tester des données de transport collectif (GTFS ou NEPTUNE)"
,
"url"
:
"http://www.conversion-validation-donnees-tc.org/"
},
]
flash_warning
(
'Ce service est fourni en mode beta - certains problèmes peuvent subsister - nous mettons tout en œuvre pour améliorer son fonctionnement en continu.'
)
return
render_template
(
'home.html'
,
title
=
'Accueil'
,
validators
=
validators
)
return
render_template
(
'home.html'
,
title
=
'Accueil'
,
validators
=
validators
,
external_validators
=
external_validators
)
@
app
.
route
(
'/validators'
)
...
...
Write
Preview
Supports
Markdown
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