Django admin, filter objects by ManyToMany reference
Well, that's how I've done it.
I made custom admin template "change_list.html". Custom template tag creates a list of all existing galleries. Filtering is made like this:

class PhotoAdmin(admin.ModelAdmin):
    ...
    def queryset(self, request):
        if request.COOKIES.has_key("gallery"):
            gallery = Gallery.objects.filter(title_slug=request.COOKIES["gallery"])
            if len(gallery)>0:
            return gallery[0].photos.all()
            return super(PhotoAdmin, self).queryset(request)


Cookie is set with javascript.
There's photologue application, simple photo gallery for django, implementing Photo and Gallery objects.
Gallery object has ManyToMany field, which references Photo objects.
I need to be able to get list of all Photos for a given Gallery.  Is it possible to add Gallery filter to Photo's admin page?
If it's possible, how to do it best?