fix: messages coming from Django where never displayed in map view

This commit is contained in:
Yohan Boniface 2024-02-08 14:45:47 +01:00
parent a94a8b75cb
commit a7425aa121

View file

@ -1,10 +1,12 @@
<script type="text/javascript"> <script type="text/javascript">
window.addEventListener('DOMContentLoaded', (event) => {
{% for m in messages %} {% for m in messages %}
{# We have just one, but we need to loop, as for messages API #} {# We have just one, but we need to loop, as for messages API #}
L.U.fire('ui:alert', { MAP.ui.alert({
content: "{{ m }}", content: "{{ m }}",
level: "{{ m.tags }}", level: "{{ m.tags }}",
duration: 100000 duration: 100000
}) })
{% endfor %} {% endfor %}
})
</script> </script>