[Fixed]-Add images to a children class


Since the FK is from Foo (and its children) to FooImage, and not the other way round, it makes no difference that you are using inheritance here: you can add the images directly to the FooBar instance as if it were a standalone one.

my_foo_bar = FooBar.objects.create(field=value)
# or
FooImage.objects.create(model=my_foo_bar, image=my_image)

Leave a comment