Put this stuff where it belongs.

parent 7034da61
......@@ -2,7 +2,7 @@
{% if request.sentry.id %}
<p>If you need assistance, you may reference this error as
{% if admin_instance %}
<a href="https://sentry.io/internet-cleanup-foundation/faalkaart/?query={{ request.sentry.id }}">{{ request.sentry.id }}</a>,
<a href="{{sentry_project_url}}/?query={{ request.sentry.id }}">{{ request.sentry.id }}</a>,
{% else %}
<strong>{{ request.sentry.id }}</strong>.</p>
{% endif %}
......
......@@ -492,3 +492,7 @@ if SENTRY_DSN:
# set javascript sentry token if provided
SENTRY_TOKEN = os.environ.get('SENTRY_TOKEN', 'https://a4f72b82fc0742bc82b82560b340006b@sentry.io/242170')
SENTRY_ORGANIZATION = 'internet-cleanup-foundation'
SENTRY_PROJECT = 'faalkaart'
SENTRY_PROJECT_URL = 'https://sentry.io/%s/%s' % (SENTRY_ORGANIZATION, SENTRY_PROJECT)
......@@ -65,7 +65,11 @@ if settings.SENTRY_DSN:
Context: None
"""
context = {'request': request, 'admin_instance': settings.ADMIN}
context = {
'request': request,
'admin_instance': settings.ADMIN,
'sentry_project_url': settings.SENTRY_PROJECT_URL,
}
# on privileged instance show the actual error message to hopefully be useful for the user
if settings.ADMIN:
......
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