mirror of
https://github.com/django/daphne.git
synced 2025-08-04 02:20:08 +03:00
Fixed #696: Runserver broke with Django 1.10 and below
This commit is contained in:
parent
8cc2842492
commit
a3f4e002ee
|
@ -42,7 +42,8 @@ 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:
|
||||
self.server_cls = RunserverCommand.server_cls
|
||||
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
|
||||
self.channel_layer = channel_layers[DEFAULT_CHANNEL_LAYER]
|
||||
|
|
Loading…
Reference in New Issue
Block a user