Hey Avery, you do make sense and I've done something similar.  In the
models of the first section (that has sub sections) I would add something
like:

    def edit_subsections(self):        '''        Returns a link to
this items change form        '''        if self.id:            return
'<a onclick="return showAddAnotherPopup(this);" href="%s">Edit
documents</a>' % admin_url(self.__class__, "change", self.id)
return ''    edit_subsections.allow_tags = True


Then inside the admin class for that you can add edit_subsections to the
fields (or fieldsets).  It also needs to be added to readonly_fields.  That
will use Django's normal admin popups, but you could update the
edit_subsections method to work in any way you want.

Hopefully that's a good start!

On Sun, Dec 21, 2014 at 1:11 AM, Avery Laird <[email protected]> wrote:

> Hi,
>
> I'm building one of those one page sites (that all the cool kids seem to
> have) and I have run into a bit of a problem. I have a custom Page class,
> with a few orderable classes that inherit from that, but I'm not sure what
> the best course of action to take is for the individual sections. I'm
> thinking about making another Orderable class, which inherits from the Page
> class, but has other orderable classes nested underneath it to form the
> sections of the site. For example, each "section" orderable has a heading
> and subheading, with other orderables nested within that can be added in
> the admin much like orderables can be added to pages. If there was a
> section with 3 icon blurbs, then there would be a "section" orderable, and
> an "icon blurb" orderable that inherits from that class. Then, in the
> admin, it can be added to every section class that is added to a page
> class. The only problem is, I have no idea where to start, whether this is
> even possible, or if I'm making any sense at all. I'd appreciate any
> insight anyone may have.
>
> Cheers,
>
> Avery
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to