mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[2.2.x] Fixed #30312 -- Relaxed admin check from django.contrib.sessions to SessionMiddleware subclasses.
Backport of efeceba589 from master
			
			
This commit is contained in:
		
				
					committed by
					
						 Mariusz Felisiak
						Mariusz Felisiak
					
				
			
			
				
	
			
			
			
						parent
						
							3c3df7db8e
						
					
				
				
					commit
					a4095dadc4
				
			| @@ -68,7 +68,6 @@ def check_dependencies(**kwargs): | ||||
|         ('django.contrib.contenttypes', 401), | ||||
|         ('django.contrib.auth', 405), | ||||
|         ('django.contrib.messages', 406), | ||||
|         ('django.contrib.sessions', 407), | ||||
|     ) | ||||
|     for app_name, error_code in app_dependencies: | ||||
|         if not apps.is_installed(app_name): | ||||
| @@ -121,6 +120,12 @@ def check_dependencies(**kwargs): | ||||
|             "be in MIDDLEWARE in order to use the admin application.", | ||||
|             id='admin.E409', | ||||
|         )) | ||||
|     if not _contains_subclass('django.contrib.sessions.middleware.SessionMiddleware', settings.MIDDLEWARE): | ||||
|         errors.append(checks.Error( | ||||
|             "'django.contrib.sessions.middleware.SessionMiddleware' must " | ||||
|             "be in MIDDLEWARE in order to use the admin application.", | ||||
|             id='admin.E410', | ||||
|         )) | ||||
|     return errors | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user