summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2014-02-12 19:09:30 +0000
committerAndrew Godwin <andrew@aeracode.org>2014-02-12 19:09:43 +0000
commitf0f1ba75b090e533c1b39f516cea2d9a15307ac3 (patch)
tree2672b43f64e8097f8e45031bfa0fbea73c0272a6
parent7e941ba67ceab8a74ba50509d13ed4298f8305cd (diff)
Fixed #21856: Don't crash runserver when DATABASES = {}
-rw-r--r--django/core/management/commands/runserver.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/django/core/management/commands/runserver.py b/django/core/management/commands/runserver.py
index e85aa88c3e..28c6337a43 100644
--- a/django/core/management/commands/runserver.py
+++ b/django/core/management/commands/runserver.py
@@ -14,6 +14,7 @@ from django.db import connections, DEFAULT_DB_ALIAS
from django.db.migrations.executor import MigrationExecutor
from django.utils import autoreload
from django.utils import six
+from django.core.exceptions import ImproperlyConfigured
naiveip_re = re.compile(r"""^(?:
(?P<addr>
@@ -101,7 +102,10 @@ class Command(BaseCommand):
self.stdout.write("Performing system checks...\n\n")
self.validate(display_num_errors=True)
- self.check_migrations()
+ try:
+ self.check_migrations()
+ except ImproperlyConfigured:
+ pass
now = datetime.now().strftime('%B %d, %Y - %X')
if six.PY2:
now = now.decode('utf-8')