diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2020-07-07 16:32:58 -0700 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-07-08 22:04:37 +0200 |
| commit | 0e6fa65ffd9abf707e6781de019b76cc2e3cd787 (patch) | |
| tree | 8ae9784aa3b91393d0a759a86d1e4f7ec47e925b /django/views | |
| parent | 779e615e362108862f1681f965ee9e4f1d0ae6d2 (diff) | |
Refs #30400 -- Improved typography in debug and csrf templates.
Diffstat (limited to 'django/views')
| -rw-r--r-- | django/views/csrf.py | 6 | ||||
| -rw-r--r-- | django/views/templates/technical_404.html | 4 | ||||
| -rw-r--r-- | django/views/templates/technical_500.html | 2 | ||||
| -rw-r--r-- | django/views/templates/technical_500.txt | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/django/views/csrf.py b/django/views/csrf.py index 27e7b5ca37..83377b1832 100644 --- a/django/views/csrf.py +++ b/django/views/csrf.py @@ -60,14 +60,14 @@ CSRF_FAILURE_TEMPLATE = """ <p>In general, this can occur when there is a genuine Cross Site Request Forgery, or when <a - href="https://docs.djangoproject.com/en/{{ docs_version }}/ref/csrf/">Django's + href="https://docs.djangoproject.com/en/{{ docs_version }}/ref/csrf/">Django’s CSRF mechanism</a> has not been used correctly. For POST forms, you need to ensure:</p> <ul> <li>Your browser is accepting cookies.</li> - <li>The view function passes a <code>request</code> to the template's <a + <li>The view function passes a <code>request</code> to the template’s <a href="https://docs.djangoproject.com/en/dev/topics/templates/#django.template.backends.base.Template.render"><code>render</code></a> method.</li> @@ -84,7 +84,7 @@ CSRF_FAILURE_TEMPLATE = """ page with the form, because the token is rotated after a login.</li> </ul> - <p>You're seeing the help section of this page because you have <code>DEBUG = + <p>You’re seeing the help section of this page because you have <code>DEBUG = True</code> in your Django settings file. Change that to <code>False</code>, and only the initial error message will be displayed. </p> diff --git a/django/views/templates/technical_404.html b/django/views/templates/technical_404.html index bc0858bba2..694309aa13 100644 --- a/django/views/templates/technical_404.html +++ b/django/views/templates/technical_404.html @@ -61,7 +61,7 @@ <p> {% if request_path %} The current path, <code>{{ request_path }}</code>,{% else %} - The empty path{% endif %} didn't match any of these. + The empty path{% endif %} didn’t match any of these. </p> {% else %} <p>{{ reason }}</p> @@ -70,7 +70,7 @@ <div id="explanation"> <p> - You're seeing this error because you have <code>DEBUG = True</code> in + You’re seeing this error because you have <code>DEBUG = True</code> in your Django settings file. Change that to <code>False</code>, and Django will display a standard 404 page. </p> diff --git a/django/views/templates/technical_500.html b/django/views/templates/technical_500.html index a384c10b9a..57d07eb933 100644 --- a/django/views/templates/technical_500.html +++ b/django/views/templates/technical_500.html @@ -474,7 +474,7 @@ Exception Value: {{ exception_value|force_escape }} {% if not is_email %} <div id="explanation"> <p> - You're seeing this error because you have <code>DEBUG = True</code> in your + You’re seeing this error because you have <code>DEBUG = True</code> in your Django settings file. Change that to <code>False</code>, and Django will display a standard page generated by the handler for this status code. </p> diff --git a/django/views/templates/technical_500.txt b/django/views/templates/technical_500.txt index f06a1a499e..71a6e150d8 100644 --- a/django/views/templates/technical_500.txt +++ b/django/views/templates/technical_500.txt @@ -59,7 +59,7 @@ Using settings module {{ settings.SETTINGS_MODULE }}{% for k, v in settings.item {{ k }} = {{ v|stringformat:"r" }}{% endfor %} {% if not is_email %} -You're seeing this error because you have DEBUG = True in your +You’re seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard page generated by the handler for this status code. {% endif %} |
