You need to include router.urls as a tuple and add the application name to the tuple, instead of including only router.urls
According to your example, you should try something like:
router = DefaultRouter() router.register('widget/', MyWidgetViewSet, base_name='widgets') urlpatterns =+ [ url(r'/path/to/API/', include((router.urls, 'my_app_name'), namespace='widget-api'), ]
source share