feat: added customer addresses and shipping method
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user