from django.urls import path, include
from rest_framework.routers import DefaultRouter
from . import views

router = DefaultRouter()
router.register(r'templates', views.CardTemplateViewSet)
router.register(r'batches', views.CardBatchViewSet)
router.register(r'cards', views.CardViewSet, basename='card')

urlpatterns = [
    path('', include(router.urls)),
    path('user/cards/', views.UserCardListView.as_view(), name='user-cards'),
    path('category/<str:category>/', views.CategoryCardTemplateListView.as_view(), name='category-templates'),
    path('mobile/products.json', views.MobileProductsDownloadView.as_view(), name='mobile-products-download'),
]

