Skip to content
Advertisement

TypeError at /api/questions/ ‘list’ object is not callable

When I go to this http://127.0.0.1:8000/api/questions/ I get

TypeError at /api/questions/

‘list’ object is not callable

urls.py

(in project)

JavaScript

urls.py

(in appName1/api

JavaScript

views.py

(in appName1/api) Only showing QuestionViewSet

JavaScript

From the settings.py

JavaScript

Error could come from somewhere else.

I don’t know where I can find “list”.

appName1 = questions

Exception Location: lib/python3.9/site-packages/rest_framework/generics.py, line 162, in paginator

Advertisement

Answer

The DEFAULT_PAGINATION_CLASS setting should be a string not a tuple/list

JavaScript
Advertisement