File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 30
30
31
31
MEDIA_URL = '/media/' # Avoids https://code.djangoproject.com/ticket/21451
32
32
33
- MIDDLEWARE_CLASSES = [
33
+ MIDDLEWARE = [
34
34
'debug_toolbar.middleware.DebugToolbarMiddleware' ,
35
35
'django.middleware.security.SecurityMiddleware' ,
36
36
'django.contrib.sessions.middleware.SessionMiddleware' ,
40
40
'django.contrib.messages.middleware.MessageMiddleware' ,
41
41
'django.middleware.clickjacking.XFrameOptionsMiddleware' ,
42
42
]
43
+ # Django < 1.10
44
+ MIDDLEWARE_CLASSES = MIDDLEWARE
43
45
44
46
ROOT_URLCONF = 'tests.urls'
45
47
Original file line number Diff line number Diff line change @@ -375,7 +375,7 @@ def test_check_gzip_middleware_error(self):
375
375
def test_middleware_factory_functions_supported (self ):
376
376
messages = run_checks ()
377
377
378
- if django .VERSION [:2 ] < (1 , 10 ):
378
+ if django .VERSION [:2 ] < (1 , 10 ) or django . VERSION [: 2 ] >= ( 2 , 0 ) :
379
379
self .assertEqual (messages , [])
380
380
else :
381
381
self .assertEqual (messages [0 ].id , '1_10.W001' )
You can’t perform that action at this time.
0 commit comments