1👍
✅
Try to specify the basename
to the routes like this:
# urls.py
router = routers.DefaultRouter()
router.register(r'users', UserViewSet, basename="users")
router.register(r'user-activity', UserActivityViewSet, basename="user-activity")
urlpatterns = [
path("", include(router.urls)),
]
PS.: Some DRF versions call that as base_name
Source:stackexchange.com