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

@ -99,4 +99,16 @@ There are three settings you can play with to control that:
# Which field to use in the URL, may also be for example "pk" to use the
# primary key and not expose the username (which may be private or may change too
# 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." %}">
<meta name="keywords" content="map, umap">
{% block extra_head %}
{% include "umap/header.html" %}
{% endblock extra_head %}
<meta name="viewport"
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 %}
{% block extra_head %}
{% umap_css %}
{{ block.super }}
{% endblock extra_head %}
{% block body_class %}
login

View file

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

View file

View file

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