From 77974a684a2e874bccd8bd9e0939ddcb367a8ed2 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Thu, 21 Jan 2016 15:54:13 +0000 Subject: Changed `action="."` to `action=""` in tests and docs. `action="."` strips query parameters from the URL which is not usually what you want. Copy-paste coding of these examples could lead to difficult to track down bugs or even data loss if the query parameter was meant to alter the scope of a form's POST request. --- tests/forms_tests/templates/forms_tests/article_form.html | 2 +- tests/templates/form_view.html | 2 +- tests/templates/login.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/forms_tests/templates/forms_tests/article_form.html b/tests/forms_tests/templates/forms_tests/article_form.html index de38466335..8ab7a85bb9 100644 --- a/tests/forms_tests/templates/forms_tests/article_form.html +++ b/tests/forms_tests/templates/forms_tests/article_form.html @@ -1,6 +1,6 @@ -
{% csrf_token %} + {% csrf_token %} {{ form.as_p }}
diff --git a/tests/templates/form_view.html b/tests/templates/form_view.html index a23fd0b657..1ef410fb71 100644 --- a/tests/templates/form_view.html +++ b/tests/templates/form_view.html @@ -2,7 +2,7 @@ {% block title %}Submit data{% endblock %} {% block content %}

{{ message }}

-
+ {% if form.errors %}

Please correct the errors below:

{% endif %} diff --git a/tests/templates/login.html b/tests/templates/login.html index 7f50df2ba1..0d301600a5 100644 --- a/tests/templates/login.html +++ b/tests/templates/login.html @@ -5,7 +5,7 @@

Your username and password didn't match. Please try again.

{% endif %} - + -- cgit v1.3
{{ form.username }}
{{ form.password }}