feat: added customer addresses and shipping method

This commit is contained in:
2024-12-23 13:27:00 +01:00
parent b2f8febdb6
commit a1f6983148
7 changed files with 279 additions and 426 deletions
+27
View File
@@ -13,6 +13,8 @@ from shop.models import (
Provider,
Tag,
Tax,
ShippingMethod,
CustomerAddress,
)
@@ -115,3 +117,28 @@ class ProductBatchAdmin(ModelAdmin):
"product",
"quantity",
)
@admin.register(ShippingMethod)
class ShippingMethodAdmin(ModelAdmin):
list_display = (
"id",
"name",
"description",
)
@admin.register(CustomerAddress)
class CustomerAddressAdmin(ModelAdmin):
list_display = (
"id",
"user",
"vat_id",
"address",
"address_state",
"address_zip",
)
def get_queryset(self, request):
qs = super().get_queryset(request)
return qs.filter(hidden=False)