mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed #21856: Don't crash runserver when DATABASES = {}
This commit is contained in:
		| @@ -14,6 +14,7 @@ from django.db import connections, DEFAULT_DB_ALIAS | |||||||
| from django.db.migrations.executor import MigrationExecutor | from django.db.migrations.executor import MigrationExecutor | ||||||
| from django.utils import autoreload | from django.utils import autoreload | ||||||
| from django.utils import six | from django.utils import six | ||||||
|  | from django.core.exceptions import ImproperlyConfigured | ||||||
|  |  | ||||||
| naiveip_re = re.compile(r"""^(?: | naiveip_re = re.compile(r"""^(?: | ||||||
| (?P<addr> | (?P<addr> | ||||||
| @@ -101,7 +102,10 @@ class Command(BaseCommand): | |||||||
|  |  | ||||||
|         self.stdout.write("Performing system checks...\n\n") |         self.stdout.write("Performing system checks...\n\n") | ||||||
|         self.validate(display_num_errors=True) |         self.validate(display_num_errors=True) | ||||||
|  |         try: | ||||||
|             self.check_migrations() |             self.check_migrations() | ||||||
|  |         except ImproperlyConfigured: | ||||||
|  |             pass | ||||||
|         now = datetime.now().strftime('%B %d, %Y - %X') |         now = datetime.now().strftime('%B %d, %Y - %X') | ||||||
|         if six.PY2: |         if six.PY2: | ||||||
|             now = now.decode('utf-8') |             now = now.decode('utf-8') | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user