Fix for Django 1.8/1.9

This commit is contained in:
Andrew Godwin 2016-02-24 07:00:33 -08:00
parent 500f0fdeb7
commit fe352542cc

View File

@ -80,7 +80,10 @@ def get_channel_layer(alias="default"):
"""
Returns the raw ASGI channel layer for this project.
"""
django.setup(set_prefix=False)
if django.VERSION[1] > 9:
django.setup(set_prefix=False)
else:
django.setup()
return channel_layers[alias].channel_layer