Django REST framework: type object X has no attribute ‘get_extra_actions’

Basically you are trying to register a non-viewset(here InstanceList a view, not a viewset) to router. Instead of this, you can simply use it in urls like this:

router = routers.DefaultRouter()
router.register(r'users',views.UserViewSet)                                                                         

urlpatterns = [ 
    path('', views.dash, name="dash"),
    path('api/', include(router.urls)),
    path('api/instances/', views.InstanceList.as_view(), name="instances"),
]

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)