from django.urls import include, path from rest_framework.routers import DefaultRouter from core.apps.api.views import CategoryViewSet, SearchHistoryViewSet, HomeAdApiView router = DefaultRouter() router.register("category", CategoryViewSet, basename="category") router.register("search-history", SearchHistoryViewSet, basename="search-history") router.register("home-ad", HomeAdApiView, basename="home-ad") urlpatterns = [path("", include(router.urls))]