HiPhone_BE/market/urls.py

17 lines
380 B
Python
Raw Permalink Normal View History

2023-05-03 14:09:55 +09:00
from django.conf import settings
from rest_framework import routers
from .viewsets import BrandViewset, PostViewset, ProductViewset
if settings.DEBUG:
router = routers.DefaultRouter()
else:
router = routers.SimpleRouter()
2023-05-16 21:49:19 +09:00
router.register("brand", BrandViewset)
router.register("product", ProductViewset)
router.register("post", PostViewset)
2023-05-03 14:09:55 +09:00
urlpatterns = router.urls