From 3a1f57e1953ec63e050aa2144ee019b6f122078c Mon Sep 17 00:00:00 2001 From: Anatoly Date: Mon, 11 Nov 2019 12:29:10 +0300 Subject: [PATCH] refactored product admin page --- apps/product/admin.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/product/admin.py b/apps/product/admin.py index b982392e..143d3ee9 100644 --- a/apps/product/admin.py +++ b/apps/product/admin.py @@ -7,6 +7,11 @@ from .models import Product, ProductType, ProductSubType, Unit @admin.register(Product) class ProductAdmin(BaseModelAdminMixin, admin.ModelAdmin): """Admin page for model Product.""" + search_fields = ('name', ) + list_filter = ('available', 'product_type') + list_display = ('id', '__str__', 'get_category_display', 'product_type') + raw_id_fields = ('country', 'subtypes', 'classifications', + 'standards', 'tags', 'gallery') @admin.register(ProductType)