From ad0368f486c66d600e416767b18d1131d2affc3a Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Sun, 10 Feb 2019 14:53:01 +0100 Subject: [PATCH] make it possible to filter products by category and ticket type, and remove description from product list --- src/shop/admin.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/shop/admin.py b/src/shop/admin.py index 9eddafdf..1605d336 100644 --- a/src/shop/admin.py +++ b/src/shop/admin.py @@ -107,12 +107,16 @@ class ProductAdmin(admin.ModelAdmin): 'category', 'ticket_type', 'price', - 'description', stock_info, available_from, available_to ] + list_filter = [ + 'category', + 'ticket_type', + ] + search_fields = ['name']