views:

112

answers:

1

I viewed the DjangoCon 2009 talks about pinax by James Tauber and pydanny and heared about pinax's groups. But I don't get the actual usecases they describe, even after reading the documentation.

So what is the real purpose of groups and what advantages do I get in using them?

It would be nice if you could provide a simple usecase to let me understand groups better.

+3  A: 

Say you have a wiki app or a todo app and you don't want your site just to have one wiki and one todo list. Say that you want your site to have teams where each team gets its own wiki and todo list.

The groups app in Pinax provides the base for you to built your teams app on. It helps you create a new model (Team in this example) with membership management and plug in the wiki and todo apps.

The groups app does this in a way that means that the author of the wiki app or todo app doesn't need to know about your teams app, they just need to know about Pinax's group app. Apps like the wiki app or todo app are hence referred to as being "group-aware".

So any time you have groups of members on your site (examples are interest groups, teams, projects, guilds, tribes, committees, circles, departments, clubs) and you have content apps (examples are wikis, tasks, forums, bookmarks) whose content is scoped to each group, the Pinax groups functionality lets you do this in a way that decouples the development of the content app from the group app.

Hope this helps!

James Tauber
Answered by the man himself. Kewl!
jpartogi
Thanks Mr. Tauber. I got it now. Maybe I should try out pinax with this knowledge in mind, implementing some sample usecases.
Gregor Müllegger
From the implementation, I see that "group-aware" apps' views each are handling the if group, if bridge etc. Wouldn't it be simpler to filter for the groups, from the queryset, in the model manager level?
Lakshman Prasad