From 6765b6adf924c1bc8792a4a454d5a788c1abc98e Mon Sep 17 00:00:00 2001 From: Marc Gibbons <1726961+marcgibbons@users.noreply.github.com> Date: Mon, 30 Sep 2024 15:52:28 -0400 Subject: [PATCH] Fixed #35797 -- Removed debug context processor from default project template. --- django/conf/project_template/project_name/settings.py-tpl | 1 - docs/intro/tutorial07.txt | 1 - docs/ref/templates/api.txt | 1 - docs/releases/5.2.txt | 3 +++ tests/admin_views/tests.py | 2 -- tests/runtests.py | 1 - 6 files changed, 3 insertions(+), 6 deletions(-) diff --git a/django/conf/project_template/project_name/settings.py-tpl b/django/conf/project_template/project_name/settings.py-tpl index 3b6caab333..5631ec9a31 100644 --- a/django/conf/project_template/project_name/settings.py-tpl +++ b/django/conf/project_template/project_name/settings.py-tpl @@ -58,7 +58,6 @@ TEMPLATES = [ 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ - 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', diff --git a/docs/intro/tutorial07.txt b/docs/intro/tutorial07.txt index e0c87be898..60a5c43bb3 100644 --- a/docs/intro/tutorial07.txt +++ b/docs/intro/tutorial07.txt @@ -324,7 +324,6 @@ Open your settings file (:file:`mysite/settings.py`, remember) and add a "APP_DIRS": True, "OPTIONS": { "context_processors": [ - "django.template.context_processors.debug", "django.template.context_processors.request", "django.contrib.auth.context_processors.auth", "django.contrib.messages.context_processors.messages", diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt index a46717b8d7..8d5c66367d 100644 --- a/docs/ref/templates/api.txt +++ b/docs/ref/templates/api.txt @@ -660,7 +660,6 @@ settings file, the default template engine contains the following context processors:: [ - "django.template.context_processors.debug", "django.template.context_processors.request", "django.contrib.auth.context_processors.auth", "django.contrib.messages.context_processors.messages", diff --git a/docs/releases/5.2.txt b/docs/releases/5.2.txt index 14ad32b706..c445e02694 100644 --- a/docs/releases/5.2.txt +++ b/docs/releases/5.2.txt @@ -328,6 +328,9 @@ Miscellaneous * ``HttpRequest.accepted_types`` is now sorted by the client's preference, based on the request's ``Accept`` header. +* The :func:`~django.template.context_processors.debug` context processor is no + longer included in the default project template. + .. _deprecated-features-5.2: Features deprecated in 5.2 diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py index fc1bb86d85..16d76f5da2 100644 --- a/tests/admin_views/tests.py +++ b/tests/admin_views/tests.py @@ -1686,7 +1686,6 @@ class AdminViewBasicTest(AdminViewBasicTestCase): "APP_DIRS": True, "OPTIONS": { "context_processors": [ - "django.template.context_processors.debug", "django.template.context_processors.request", "django.contrib.auth.context_processors.auth", "django.contrib.messages.context_processors.messages", @@ -7695,7 +7694,6 @@ class AdminDocsTest(TestCase): "APP_DIRS": True, "OPTIONS": { "context_processors": [ - "django.template.context_processors.debug", "django.template.context_processors.request", "django.contrib.auth.context_processors.auth", "django.contrib.messages.context_processors.messages", diff --git a/tests/runtests.py b/tests/runtests.py index c5bb637d33..516da84768 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -221,7 +221,6 @@ def setup_collect_tests(start_at, start_after, test_labels=None): "APP_DIRS": True, "OPTIONS": { "context_processors": [ - "django.template.context_processors.debug", "django.template.context_processors.request", "django.contrib.auth.context_processors.auth", "django.contrib.messages.context_processors.messages",