rabbagliettiandrea / dj-nested-inlines

Adds nested inline support in Django admin
38 stars 34 forks source link

Copying objects using NestedStackedInline with images #37

Open ursomniac opened 7 years ago

ursomniac commented 7 years ago

I have a model that I'm trying to copy using the Admin's save_as (= True). If the NestedInline model has an ImageField, you get the error that the ImageField file name can't be blank - it doesn't copy from the Admin.

I can fix this for a "normal" model (no inlines, esp. no nested inlines), but I can't figure out how to intercept the formfield validator on the nested inline (and access the request) so as to "fill in" the necessary data so that all the fields are copied and things validate properly.

I can't be the first person who has run into this. Any recommendations would be greatly appreciated.