Fixed #696: Runserver broke with Django 1.10 and below

This commit is contained in:
Andrew Godwin 2017-07-02 17:04:51 -07:00
parent 8cc2842492
commit a3f4e002ee

View File

@ -42,6 +42,7 @@ class Command(RunserverCommand):
def inner_run(self, *args, **options):
# Maybe they want the wsgi one?
if not options.get("use_asgi", True) or DEFAULT_CHANNEL_LAYER not in channel_layers:
if hasattr(RunserverCommand, "server_cls"):
self.server_cls = RunserverCommand.server_cls
return RunserverCommand.inner_run(self, *args, **options)
# Check a handler is registered for http reqs; if not, add default one