For me, the cause of this error was sending arguments to the register function in the wrong order.
Check the order of registering a ModelAdmin: it’s the model class first, then the ModelAdmin class.
Example: admin.site.register(Model, ModelAdmin)
I suppose naturally the second one has to be the ModelAdmin since register(MyModel) works as well. That’s one good way to think about it.
Thanks for the tip – this was a confusing error.
Thanks a lot, a really helpful post. And a nice idea how not to confuse the order.
Thanks a lot, dude. It was really helpful
Thank you! You save my time and nerves 🙂
thanks 🙂
I got this error too, but had no idea what was causing it, because nothing looked wrong in my admin.py. It’s not the problem that drives you insane, it’s finding the resolution for it 🙂
Thanks, that’s goot tip. I forgot to add “Admin” to name of the class.
Thanks!
awesome
thank you!
This was at the top of the search for “‘MediaDefiningClass’ object is not iterable” and is the obvious solution! Thanks, it was nice not having to stress over a an Error Page for once!
thanks man
Thanks for posting this, it helped me
Thank you for article.It’s very useful.
That solved the problem, thanks
Thank you for posting this! Nearly pulled all of my hair out!!
Thanks!!!