Fix multiple form and table issues
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block navigation %}
|
||||
{% endblock navigation %}
|
||||
|
||||
{% block content %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
{{ errors|safe }}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,18 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
<div>
|
||||
<div>
|
||||
<h3>{% trans "Error" %}</h3>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-danger">
|
||||
{{ error|safe }}
|
||||
</div>
|
||||
<div>
|
||||
<button onclick="window.history.back();" class="btn btn-primary">{% trans "Back" %}</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
+4
-4
@@ -184,9 +184,9 @@ def kaehmy_submit(request, *args, **kwargs):
|
||||
|
||||
else:
|
||||
context = {
|
||||
'errors': form.errors
|
||||
'error': form.errors
|
||||
}
|
||||
return render(request, 'error.html', context)
|
||||
return render(request, 'kaehmy_error.html', context)
|
||||
return HttpResponseRedirect('/kaehmy')
|
||||
|
||||
|
||||
@@ -283,9 +283,9 @@ def kaehmy_comment(request, *args, **kwargs):
|
||||
else:
|
||||
print(form)
|
||||
context = {
|
||||
'errors': form.errors
|
||||
'error': form.errors
|
||||
}
|
||||
return render(request, 'error.html', context)
|
||||
return render(request, 'kaehmy_error.html', context)
|
||||
|
||||
|
||||
@require_http_methods(["GET"])
|
||||
|
||||
Reference in New Issue
Block a user