summaryrefslogtreecommitdiff
path: root/django/conf/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/conf/__init__.py')
-rw-r--r--django/conf/__init__.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/django/conf/__init__.py b/django/conf/__init__.py
index 80f3115d47..57623db42e 100644
--- a/django/conf/__init__.py
+++ b/django/conf/__init__.py
@@ -34,6 +34,11 @@ USE_L10N_DEPRECATED_MSG = (
'display numbers and dates using the format of the current locale.'
)
+CSRF_COOKIE_MASKED_DEPRECATED_MSG = (
+ 'The CSRF_COOKIE_MASKED transitional setting is deprecated. Support for '
+ 'it will be removed in Django 5.0.'
+)
+
class SettingsReference(str):
"""
@@ -206,6 +211,9 @@ class Settings:
if self.is_overridden('USE_DEPRECATED_PYTZ'):
warnings.warn(USE_DEPRECATED_PYTZ_DEPRECATED_MSG, RemovedInDjango50Warning)
+ if self.is_overridden('CSRF_COOKIE_MASKED'):
+ warnings.warn(CSRF_COOKIE_MASKED_DEPRECATED_MSG, RemovedInDjango50Warning)
+
if hasattr(time, 'tzset') and self.TIME_ZONE:
# When we can, attempt to validate the timezone. If we can't find
# this file, no check happens and it's harmless.
@@ -254,6 +262,8 @@ class UserSettingsHolder:
self._deleted.discard(name)
if name == 'USE_L10N':
warnings.warn(USE_L10N_DEPRECATED_MSG, RemovedInDjango50Warning)
+ if name == 'CSRF_COOKIE_MASKED':
+ warnings.warn(CSRF_COOKIE_MASKED_DEPRECATED_MSG, RemovedInDjango50Warning)
super().__setattr__(name, value)
if name == 'USE_DEPRECATED_PYTZ':
warnings.warn(USE_DEPRECATED_PYTZ_DEPRECATED_MSG, RemovedInDjango50Warning)