Hi Eduardo,

Thanks for your advice.  What I'm trying to do is a bit like a gallery, but 
where individual photos can have several images attached to them.  The 
purpose of this is for preserving some old photos where some have several 
prints of the same negative or where I want to capture both the front and 
back of the photo because it has a description written on it and so on.  To 
do this, I'm using a model like this:

class Gallery(Page):
    pass

class GalleryImage(Orderable):
    gallery = ForeignKey('Gallery')
    caption = CharField(max_length = 200)
    description = TextField()

    def get_thumbnail(self):
        pass  # ie fill it in later

class GalleryImageVersion(Orderable):
    gallery_image = ForeignKey('GalleryImage')
    thumbnail = FileField(...)
    small_version = FileField(...)
    full_size_version = FileField(...)

That's only a sketch of the model, of course, but it gives you the idea. 
 So I'd like to have an admin page for each Gallery, with GalleryImage 
instances shown as stackable inlines and then each GalleryImageVersion as a 
tabular inline within the stackable inline.

As far as I can tell, my options are either to use straight Django admins 
(I note that Django-latest has had inlineable admins for the last few days, 
not sure if I want to go that bleeding edge) or come up with some other 
structure.  Is that about right?

Thanks again,
Tom

On Thursday, 14 May 2015 10:04:59 UTC+9:30, Eduardo Rivas wrote:
>
>  Hi Tom. For your particular requirements, I would say no, Mezzanine lacks 
> this feature. There are some projects out there that are meant to do it for 
> vanilla Django <https://github.com/s-block/django-nested-inline> and for 
> Grappelli <https://github.com/datahub/grappelli-nested-inlines>. In the 
> case of that last one, remember Mezzanine uses a custom version of 
> Grappelli which might not be identical to the standard Grappelli. I can't 
> vouch for these projects, they just came up first on a Google search.
>
> As a side note, I would recommend you reconsider the approach of what 
> you're trying to do. I've found myself sometimes wishing to have nested 
> inlines, but most of the times it is because I want sorting functionality 
> or I'm trying to edit several models related to each other. In the first 
> case, I've used Django admin sortable 
> <https://github.com/iambrandontaylor/django-admin-sortable> (which works 
> great with Mezzanine) to add a "Sort" button to the list view of my models. 
> In the second case, I often add links to edit related objects from one list 
> view to another (using admin URLs and filters in the GET parameters). 
> Perhaps you'll be interested in exploring these routes.
>  

-- 
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 mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to