feat: added categories

This commit is contained in:
2024-12-31 11:19:28 +01:00
parent eae54d5198
commit 3de6bbcc29
16 changed files with 166 additions and 36 deletions
+15 -2
View File
@@ -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",
)