from django.conf.urls import include, url from rest_framework import routers from .views import TagViewSet, ProductViewSet, ReceiptViewSet, ProductOnBillViewSet, ShopTagViewSet, ShopViewSet router = routers.DefaultRouter() router.register('tags', TagViewSet) router.register('shop_tags', ShopTagViewSet) router.register('shops', ShopViewSet) router.register('products', ProductViewSet) router.register('products_on_bills', ProductOnBillViewSet) router.register('receipts', ReceiptViewSet) # router.register('stats', GeneralStats) urlpatterns = [ url("^", include(router.urls)), ]