Move the groups at class definition (#321)

This commit is contained in:
Krukov D 2016-08-26 22:12:14 +03:00 committed by Andrew Godwin
parent c8fdea6460
commit e6236f79e6

View File

@ -27,6 +27,8 @@ class WebsocketConsumer(BaseConsumer):
slight_ordering = False
strict_ordering = False
groups = None
def get_handler(self, message, **kwargs):
"""
Pulls out the path onto an instance variable, and optionally
@ -54,7 +56,7 @@ class WebsocketConsumer(BaseConsumer):
Group(s) to make people join when they connect and leave when they
disconnect. Make sure to return a list/tuple, not a string!
"""
return []
return self.groups or []
def raw_connect(self, message, **kwargs):
"""