The green plus sign button for adding new instances in the admin form disappears for my MultiSelect field (photos) when I define it in my form. Ie, removing the line with the definition (photos = ...) makes the plus sign appear. However, in order to use a custom Field/Widget I need to figure this out.
class GalleryForm(ModelForm):
photos = ModelMultipleChoiceField(queryset=Photo.objects.all(), label="Photos")
def __init__(self, *args, **kwargs):
super(GalleryForm, self).__init__(*args, **kwargs)
I've peeked at the Django source code and it seems like I have to wrap my widget in a RelatedFieldWidgetWrapper, but I haven't quite gotten my head around it. Any help is apprecietad!