Features: 1) Add AddressViewSet to API routing; 2) Add is_publicly_visible attribute to Address model;
Fixes: Extra: 1) Minor import addition for AddressViewSet in api_urls.py;
This commit is contained in:
parent
e259cf202c
commit
4f4d4c5c10
2 changed files with 4 additions and 0 deletions
|
|
@ -14,6 +14,7 @@ from core.views import (
|
|||
sitemap_index,
|
||||
)
|
||||
from core.viewsets import (
|
||||
AddressViewSet,
|
||||
AttributeGroupViewSet,
|
||||
BrandViewSet,
|
||||
CategoryViewSet,
|
||||
|
|
@ -39,6 +40,7 @@ core_router.register(r"feedbacks", FeedbackViewSet, basename="feedbacks")
|
|||
core_router.register(r"stocks", StockViewSet, basename="stocks")
|
||||
core_router.register(r"promo_codes", PromoCodeViewSet, basename="promo_codes")
|
||||
core_router.register(r"promotions", PromotionViewSet, basename="promotions")
|
||||
core_router.register(r"addresses", AddressViewSet, basename="addresses")
|
||||
|
||||
sitemaps = {
|
||||
'products': ProductSitemap,
|
||||
|
|
|
|||
|
|
@ -1230,6 +1230,8 @@ class Documentary(NiceModel):
|
|||
|
||||
|
||||
class Address(NiceModel):
|
||||
is_publicly_visible = False
|
||||
|
||||
street = CharField(_("street"), max_length=255, null=True) # noqa: DJ001
|
||||
district = CharField(_("district"), max_length=255, null=True) # noqa: DJ001
|
||||
city = CharField(_("city"), max_length=100, null=True) # noqa: DJ001
|
||||
|
|
|
|||
Loading…
Reference in a new issue