Commit f47eeebe authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

Fix access to config variables in templates

parent 8ebc2012
# Changelog
## next
- Fix access to config variables in jinja2 templates (restoring matomo and sentry tracker)
## 0.5.3
- Upgrade validata-core requirement to `0.7.2` (fix UTF-8 BOM issue)
......
......@@ -23,7 +23,7 @@
<a class="navbar-brand" href="{{ url_for('home') }}">
<img src="{{ url_for('static', filename='img/logo-horizontal.png') }}" height="15" alt="Validata" />
</a>
{% for link in config.header.links %}
{% for link in config.CONFIG.header.links %}
<a class="nav-link" href="{{ link.url }}" target="_blank">{{ link.title }}</a>
{% endfor %}
<a class="btn btn-outline-danger ml-auto" rel="external" target="_blank" href="https://git.opendatafrance.net/validata/validata-ui/issues/new?issuable_template=Probl%C3%A8me">
......@@ -71,7 +71,7 @@
développée par <a href="https://jailbreak.paris">Jailbreak</a>.
</p>
<p>
{% for link in config.footer.links %}
{% for link in config.CONFIG.footer.links %}
<a href="{{ link.url }}" target="_blank">{{ link.title }}</a>
{{ " | " if not loop.last }}
{% endfor %}
......
......@@ -445,7 +445,7 @@ def validate(schema_instance: SchemaInstance, validata_resource: ValidataResourc
return render_template(
"validation_report.html",
config=config.CONFIG,
config=config,
badge_msg=badge_msg,
badge_url=badge_url,
breadcrumbs=[
......@@ -577,9 +577,7 @@ def home():
"catalog": schema_info_list,
}
return render_template(
"home.html", config=config.CONFIG, sections=list(iter_sections())
)
return render_template("home.html", config=config, sections=list(iter_sections()))
@app.route("/pdf")
......@@ -675,7 +673,7 @@ def custom_validator():
)
return render_template(
"validation_form.html",
config=config.CONFIG,
config=config,
branches=schema_instance.branches,
breadcrumbs=[
{"url": url_for("home"), "title": "Accueil"},
......
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