Skip to content
Snippets Groups Projects
Unverified Commit f33316cc authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Add list of contacts.

parent 4868e181
No related branches found
No related tags found
1 merge request!12Add custom error pages.
......@@ -5,7 +5,14 @@
<h1>{% blocktrans %}Oops!{% endblocktrans %} [{{ error }}]</h1>
<div class="jumbotron">
<p>
{{ message }} <a href="mailto:{{ admins.0.1 }}">{{ admins.0.0 }}</a>.
{{ message }}
</p>
<ul>
{% for admin in admins %}
<li>
<a href="{{ admin.1 }}">{{ admin.0 }}</a>
</li>
{% endfor %}
</ul>
</div>
{% endblock %}
from django.contrib.auth.decorators import login_required
from django.conf import settings
from django.http import Http404
from django.shortcuts import render
from django_tables2 import RequestConfig
from django.utils.translation import ugettext_lazy as _
from .models import Person, Group
from .tables import PersonsTable, GroupsTable
......@@ -20,7 +22,7 @@ def handler404(request, exception):
admins = settings.ADMINS
context['admins'] = admins
message = _('This page does not exist. If you were redirected by a link on an external page, it would be possible that the link was wrong. But it you were redirected to this page by a link on this site, please contact')
message = _('This page does not exist. If you were redirected by a link on an external page, it would be possible that the link was wrong. But it you were redirected to this page by a link on this site, please contact one of the following contacts.')
context['message'] = message
return render(request, 'error.html', context, status=404)
......@@ -35,7 +37,7 @@ def handler500(request):
admins = settings.ADMINS
context['admins'] = admins
message = _('An unexpected error has occurred. This is probably due a bug in BiscuIT. Please contact')
message = _('An unexpected error has occurred. This is probably due a bug in BiscuIT. Please contact one of the following contacts.')
context['message'] = message
return render(request, 'error.html', context, status=500)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment