supporting nested groups

9 views
Skip to first unread message

bobhaugen

unread,
Oct 13, 2009, 11:01:40 AM10/13/09
to Pinax Core Development
As you might have read in this thread:
http://groups.google.com/group/pinax-users/browse_thread/thread/cfc39c6b472236b6
I have been experimenting with the current Pinax groups
implementation, to see if I can get nested groups to work.

(For example, Company has Projects that have Tasks.)

I could not get it to work using the implementation as written, so I
tried to hack it so it would work, and got something going that at
least sorta works.

I pasted some of the code here:
http://code.pinaxproject.com/paste/IJD1/

Should give you some idea where I went, but if anybody wants to see
more, or the whole project in context, I could post it on git hub or
something.

I am stopping here, to think about it and get some feedback.

My current questions include:

1. Is this (nested groups) a good idea at all?

2. If so, is this a good way to do it? Or does somebody have a better
idea?

3. Was there some way I could have gotten nested groups to work
without changing the current groups code?

4. Is the current groups code a good basis for doing nested/composite
groups, or should I rethink from the ground up?

Adam Nelson

unread,
Oct 13, 2009, 11:28:01 AM10/13/09
to pinax-c...@googlegroups.com
It seems like simple non-exclusive groups would be the best option.
Then you get two methods:

All users for a group
All groups for a user

Actually having properly nested groups seems useful in well structured
organizations where groups can have membership be other groups or
users. In that case, maybe a recursive relationship handles it?

http://docs.djangoproject.com/en/dev/ref/models/fields/#recursive-relationships
--
Adam Nelson

http://unhub.com/varud

bobhaugen

unread,
Oct 13, 2009, 11:50:36 AM10/13/09
to Pinax Core Development
On Oct 13, 10:28 am, Adam Nelson <a...@varud.com> wrote:
> It seems like simple non-exclusive groups would be the best option.

Adam, my experiment was to explore the current Pinax groups
implementation, which includes features to manage the urlpattern and
navbar relationships between group apps and their associated content
apps.

I may in the end need to start over, but then I would still need to
manage the urlpattern and navbar relationships.
Reply all
Reply to author
Forward
0 new messages