From a4b618a269b0196038d2e4dfdcf2e7853a08a1ad Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Tue, 8 Aug 2017 13:27:12 +0200 Subject: [PATCH] make admin listing of custom orders more nice --- src/shop/admin.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/shop/admin.py b/src/shop/admin.py index fee157b6..cb68b1f2 100644 --- a/src/shop/admin.py +++ b/src/shop/admin.py @@ -9,8 +9,21 @@ admin.site.register(models.CoinifyAPICallback) admin.site.register(models.CoinifyAPIRequest) admin.site.register(models.Invoice) admin.site.register(models.CreditNote) -admin.site.register(models.CustomOrder) +@admin.register(models.CustomOrder) +class CustomOrderAdmin(admin.ModelAdmin): + list_display = [ + 'id', + 'customer', + 'text', + 'amount', + 'vat', + 'paid', + ] + + list_filter = [ + 'paid', + ] @admin.register(models.ProductCategory) class ProductCategoryAdmin(admin.ModelAdmin):