pinax groups experiments

1 view
Skip to first unread message

bobhaugen

unread,
Nov 13, 2009, 2:46:01 PM11/13/09
to Pinax Core Development
This is a followup to http://groups.google.com/group/pinax-core-dev/browse_thread/thread/bd6f5d4df6a78e8

I now have working proofs of concept at:
http://github.com/bhaugen/pinax-groups-experiments
of:
* nested groups (e.g. company/projects/tasks)
* content app instances associated with 2 different groups
* some navbar improvements

Note: these are ~not~ infinitely nested groups. Only works for 2
levels. (That's all I need.)

Navbar improvements include:
* Project/tasks retains the Project maintab hilite (that's a bug fix)
* Likewise Company/Project/Tasks retains the Company maintab hilite
* Current subnav links are hilit (related to http://code.pinaxproject.com/tasks/task/115/
)

My goal in these experiments to see if Pinax was ready to work for an
upcoming real project. The various apps in the experimental project
are not the ones for the real project, but very simple placeholders.

I posted this mostly to do my duty. Don't know if anybody else is
very interested, but I got the stuff to work well enough to meet my
personal requirements for now, and you never know about anybody
else...

skylar....@gmail.com

unread,
Nov 13, 2009, 3:01:40 PM11/13/09
to pinax-c...@googlegroups.com
Thanks for the movement.
...

Brian Rosner

unread,
Nov 14, 2009, 4:06:48 AM11/14/09
to pinax-c...@googlegroups.com

On Nov 13, 2009, at 12:46 PM, bobhaugen wrote:

>
> This is a followup to http://groups.google.com/group/pinax-core-dev/browse_thread/thread/bd6f5d4df6a78e8
>
> I now have working proofs of concept at:
> http://github.com/bhaugen/pinax-groups-experiments
> of:
> * nested groups (e.g. company/projects/tasks)
> * content app instances associated with 2 different groups
> * some navbar improvements

I will definitely take look.

> Navbar improvements include:
> * Project/tasks retains the Project maintab hilite (that's a bug fix)
> * Likewise Company/Project/Tasks retains the Company maintab hilite
> * Current subnav links are hilit (related to http://code.pinaxproject.com/tasks/task/115/
> )

From the sounds of it these can likely get moved back upstream. I'll
take a closer look and let you know.

> My goal in these experiments to see if Pinax was ready to work for an
> upcoming real project. The various apps in the experimental project
> are not the ones for the real project, but very simple placeholders.

This is common. We've done this in a few cases on internal projects at
Eldarion.

> I posted this mostly to do my duty. Don't know if anybody else is
> very interested, but I got the stuff to work well enough to meet my
> personal requirements for now, and you never know about anybody
> else...

This need has cropped itself up in an internal project so it is a very
real requirement for myself. I've moved Pinax's group support out into
an external app that I'll get hooked up in Pinax once I've done the
nested group support. You can follow along on my branch — http://github.com/brosner/django-groups/tree/nested_groups

I've already begun making some fixes. I still have some more to go,
but one change I've made that seemed to be a sticking point in your
research was dealing with multiple group_slug groups in URLs which
Django complains and rightfully so. I've solved this by use the group
model _meta.object_name.lower(). See http://github.com/brosner/django-groups/commit/142b6bea6d0fb6b3efbd9b58a840b4baea75cb70
.

Brian Rosner
http://oebfare.com
http://twitter.com/brosner

bobhaugen

unread,
Nov 14, 2009, 8:05:48 AM11/14/09
to Pinax Core Development


On Nov 14, 3:06 am, Brian Rosner <bros...@gmail.com> wrote:
> On Nov 13, 2009, at 12:46 PM, bobhaugen wrote:
> > Navbar improvements include:
> > * Project/tasks retains the Project maintab hilite (that's a bug fix)
> > * Likewise Company/Project/Tasks retains the Company maintab hilite
> > * Current subnav links are hilit (related tohttp://code.pinaxproject.com/tasks/task/115/
> > )
>
>  From the sounds of it these can likely get moved back upstream. I'll  
> take a closer look and let you know.

The Project maintab hilite was retained by adding a block.super to
tasks/base.html, like so:
{% block body_class %}{{ block.super }} tasks{% endblock %}

(was jtauber's idea...)

I think that should get moved upstream.

The subnav link hilites use the same technique and also require id's
on the il's which are then used in site_tabs.css. Not sure that is
the best way to do it, but it works, and fits the overall pinax nav
pattern of the moment.

Company/projects/tasks navbars required a bunch of other finagling
including a body_class parameter. It works, but is ugly (not the
body_class parm but the other kludges), and I would rethink it all
after I see how you handle nested groups.
Reply all
Reply to author
Forward
0 new messages