Added a custom csrf failure view

This commit is contained in:
Raphael Michel
2015-11-05 10:19:05 +01:00
parent 79ad8b40ed
commit ee93495fda
3 changed files with 58 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
{% extends "error.html" %}
{% load i18n %}
{% block title %}{% trans "Verification failed" %}{% endblock %}
{% block content %}
<i class="fa fa-frown-o big-icon"></i>
<h1>{% trans "Verification failed" %}</h1>
<p>{% blocktrans trimmed %}
We could not verify that this request really was sent from you. For security reasons, we therefore cannot process it.
{% endblocktrans %}</p>
{% if no_referer %}
<p>{{ no_referer1 }}</p>
<p>{{ no_referer2 }}</p>
{% elif no_cookie %}
<p>{{ no_cookie1 }}</p>
<p>{{ no_cookie2 }}</p>
{% else %}
<p>{% blocktrans trimmed %}
Please go back to the last page, refresh this page and then try again. If the problem persists, please get in touch with us.
{% endblocktrans %}</p>
{% endif %}
<p>
<a href="javascript:history.back()">{% trans "Take a step back" %}</a>
</p>
{% endblock %}