mirror of
https://github.com/django/daphne.git
synced 2025-04-20 08:42:18 +03:00
Move the groups at class definition (#321)
This commit is contained in:
parent
c8fdea6460
commit
e6236f79e6
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user