Merge pull request #1569 from umap-project/sentry

feat: Adding Sentry errors reporter support
This commit is contained in:
David Larlet 2024-02-07 09:35:52 -05:00 committed by GitHub
commit 3468a77ce7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 17 additions and 1 deletions

View file

@ -100,3 +100,15 @@ There are three settings you can play with to control that:
# primary key and not expose the username (which may be private or may change too # primary key and not expose the username (which may be private or may change too
# often for URL persistance) # often for URL persistance)
USER_URL_FIELD = "username" USER_URL_FIELD = "username"
## Custom header and/or footer scripts
You can populate the content of you own `umap/header.html` and `umap/footer.html`
templates with `<script>` elements, it might be useful for instance
for analytics (footer) or bug reporting like Sentry (header).
By default, these files are empty.
You must define you own paths for extra templates following
[Djangos documentation for this particular setting](https://docs.djangoproject.com/en/4.2/ref/settings/#templates).

View file

@ -12,6 +12,7 @@
content="{% trans "uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site." %}"> content="{% trans "uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site." %}">
<meta name="keywords" content="map, umap"> <meta name="keywords" content="map, umap">
{% block extra_head %} {% block extra_head %}
{% include "umap/header.html" %}
{% endblock extra_head %} {% endblock extra_head %}
<meta name="viewport" <meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

View file

@ -2,6 +2,7 @@
{% load umap_tags i18n %} {% load umap_tags i18n %}
{% block extra_head %} {% block extra_head %}
{% umap_css %} {% umap_css %}
{{ block.super }}
{% endblock extra_head %} {% endblock extra_head %}
{% block body_class %} {% block body_class %}
login login

View file

@ -5,6 +5,7 @@
{% endblock body_class %} {% endblock body_class %}
{% block extra_head %} {% block extra_head %}
{% umap_css %} {% umap_css %}
{{ block.super }}
{% umap_js %} {% umap_js %}
{% endblock extra_head %} {% endblock extra_head %}
{% block header %} {% block header %}

View file

View file

@ -13,6 +13,7 @@
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% umap_css %} {% umap_css %}
{{ block.super }}
{% umap_js locale=locale %} {% umap_js locale=locale %}
{% if object.share_status != object.PUBLIC %}<meta name="robots" content="noindex">{% endif %} {% if object.share_status != object.PUBLIC %}<meta name="robots" content="noindex">{% endif %}
<link rel="alternate" type="application/json+oembed" <link rel="alternate" type="application/json+oembed"