Django admin: how to enable add/edit buttons for many-to-many model relationships
21 Jul 2015
It was pretty easy to add an inline for many-to-many model relationship Django admin, like it was mentioned in the Django documentation.
The trick is that line in
But what wasn’t unclear to me is why there is no add/edit buttons on inline items in the Django admin interface, so I couldn’t add or edit any of related model’s objects.
admin.py (before fix):
My mistake was that I didn’t register related model
admin.py. After adding
admin.site.register(OfferGeo) add/edit buttons appeared.
admin.py looks like this:
Hope this helps someone else.