from app_listing import views
from django.urls import path, include
from rest_framework import routers
router = routers.DefaultRouter()
router.register(r'category', views.CategoryViewSet)
urlpatterns = [
path('api/', include('router.urls'))
]
urlpatterns += router.urls
Here is the error while trying to include router.urls ,ModuleNotFoundError: No module named 'router'.
I am using Django2.1,DRF 3.8.2 and python 3.6. Tried a lot, but couldn't find a proper solution for this. Is this still an open issue ? Please help!.