[Fixed]-Can I use Django groups as friends list?

1đź‘Ť

âś…

If you read here:

Beyond permissions, groups are a convenient way to categorize users to
apply some label, or extended functionality, to them. For example, you
could create a group 'Special users', and you could write code that would
do special things to those users -- such as giving them access to a
members-only portion of your site, or sending them members-only email
messages.
...

what means for me that in general you can use it applying different labels to them like “Alex friends” or “Marty friends” But do you really want to do it? Simpler is to create new model and leave Django groups for what they were supposed to.

If you create your model you can apply permissions to the instances or create your own permissions in Meta section of the model like:

  class Meta:
    permissions = (
        ('participate_contest', _('Participate Contest')),
        ('unparticipate_contest', _('Unparticipate Contest')),
    )

Leave a comment