[Answer]-Getting list-display to show ManyToManyField in an organized format Django

1👍

You can use filter_horizontal:

 class PurchaseOrderAdmin(admin.ModelAdmin):
     list_display = ('get_products')
     filter_vertical = ['product']

Or you can use an inline:

class ProductInline(admin.TabularInline):
     model = Product

 class PurchaseOrderAdmin(admin.ModelAdmin):
     inlines = (ProductInline,)

Leave a comment