Hi all,
    I'm a relative beginner to django. For a test project I'm making an app 
where users can create leaderboards. Owners of the leaderboards can add 
other people as members and delete boards. Members of the leaderboards can 
update entries. Anonymous people can view the leaderboards.

   I used django-registration for login and I'm using django-guardian for 
permissions. What I'm confusing myself about is this whether I should add 
fields in my model to track the owner and members. If I don't, I could 
still use (I think) guardian to restrict permissions. Here are the 
questionable entries:

class LeaderBoard(models.Model):
   owner = models.ManyToManyField(User)   <--------- do I need this?
   other stuff...


class LeaderBoardMembers(models.Models):          <-------- do I need this 
model at all?
   member = models.ManyToManyFields(User)
   board = models.ManyToManyFields(LeaderBoard)

Then I give the Owner permission for editing Members, deleting board. And I 
give Members, permission to update entries. But if I'm using guardian to 
handle permissions, do I even need to add these fields to the model? They 
don't seem to be required for any functionality. However, if I remove them, 
how would I know who is a member of the board or the owner of a board? 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cf5aede4-d72b-440e-ab1a-e49fc82aacc7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to