refactored product admin page
This commit is contained in:
parent
358407e786
commit
3a1f57e195
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user