summaryrefslogtreecommitdiff
path: root/django/core/checks/compatibility/django_1_10.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/core/checks/compatibility/django_1_10.py')
-rw-r--r--django/core/checks/compatibility/django_1_10.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/django/core/checks/compatibility/django_1_10.py b/django/core/checks/compatibility/django_1_10.py
new file mode 100644
index 0000000000..0ab28df6f8
--- /dev/null
+++ b/django/core/checks/compatibility/django_1_10.py
@@ -0,0 +1,17 @@
+from __future__ import unicode_literals
+
+from django.conf import global_settings, settings
+
+from .. import Tags, Warning, register
+
+
+@register(Tags.compatibility)
+def check_duplicate_middleware_settings(app_configs, **kwargs):
+ if settings.MIDDLEWARE is not None and settings.MIDDLEWARE_CLASSES != global_settings.MIDDLEWARE_CLASSES:
+ return [Warning(
+ "The MIDDLEWARE_CLASSES setting is deprecated in Django 1.10 "
+ "and the MIDDLEWARE setting takes precedence. Since you've set "
+ "MIDDLEWARE, the value of MIDDLEWARE_CLASSES is ignored.",
+ id='1_10.W001',
+ )]
+ return []