feat: added categories
This commit is contained in:
+15
-2
@@ -5,16 +5,17 @@ from shop.models import (
|
||||
Brand,
|
||||
Cart,
|
||||
CartItem,
|
||||
CustomerAddress,
|
||||
Order,
|
||||
OrderLine,
|
||||
Product,
|
||||
ProductBatch,
|
||||
ProductCategory,
|
||||
ProductPrice,
|
||||
Provider,
|
||||
ShippingMethod,
|
||||
Tag,
|
||||
Tax,
|
||||
ShippingMethod,
|
||||
CustomerAddress,
|
||||
)
|
||||
|
||||
|
||||
@@ -142,3 +143,15 @@ class CustomerAddressAdmin(ModelAdmin):
|
||||
def get_queryset(self, request):
|
||||
qs = super().get_queryset(request)
|
||||
return qs.filter(hidden=False)
|
||||
|
||||
|
||||
@admin.register(ProductCategory)
|
||||
class ProductCategoryAdmin(ModelAdmin):
|
||||
list_display = (
|
||||
"id",
|
||||
"name",
|
||||
"parent",
|
||||
"promoted",
|
||||
"hidden",
|
||||
"show_in_navbar",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user