Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Managing groups in Django Channels
class User(AbstractBaseUser, PermissionsMixin):
Maintain user and its attributes
def group_name(self):
Returns a group name based on the user's id to be used by Django Channels.
Example usage:
user = User.objects.get(pk=1)
group_name = user.group_name
return "user_%s" %
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment