Allow editing product display order in list view

This commit is contained in:
Gabriel Augendre 2022-04-24 19:19:15 +02:00
parent 0a8c113630
commit 91d71094cd

View file

@ -7,6 +7,7 @@ from purchase.models import Basket, BasketItem, PaymentMethod, Product
@register(Product)
class ProductAdmin(admin.ModelAdmin):
list_display = ["name", "display_order", "unit_price"]
list_editable = ["display_order"]
search_fields = ["name"]
def unit_price(self, instance: Product):