Rest API function: indexes_template_list [SOLVED]

When things don't work as they should.
Post Reply
qra
Posts: 12
Joined: Fri Oct 25, 2019 9:08 pm

Rest API function: indexes_template_list [SOLVED]

Post by qra »

Hi. I'm having a problem with the function /api/indexes/{id}/template/. Always returns an internal server error (500). This is an fragment from my error log (mayan-gunicorn-stderr---supervisor-pTuG3b.log):

Code: Select all

...
mayan.apps.common.middleware.error_logging <12328> [ERROR] "process_exception() line 17 ESC[31;1mException caught by request middleware; <WSGIRequest: GET '/api/indexes/1/template/'>, 'APIIndexTemplateListView' should either include a `queryset` attribute, or override the `get_queryset()` method.ESC[0m"
Traceback (most recent call last):
  File "/opt/mayan-edms/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/mayan-edms/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/opt/mayan-edms/lib/python3.6/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/opt/mayan-edms/lib/python3.6/site-packages/rest_framework/views.py", line 494, in dispatch
    response = self.handle_exception(exc)
  File "/opt/mayan-edms/lib/python3.6/site-packages/rest_framework/views.py", line 454, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/opt/mayan-edms/lib/python3.6/site-packages/rest_framework/views.py", line 491, in dispatch
    response = handler(request, *args, **kwargs)
  File "/opt/mayan-edms/lib/python3.6/site-packages/rest_framework/generics.py", line 201, in get
    return self.list(request, *args, **kwargs)
  File "/opt/mayan-edms/lib/python3.6/site-packages/rest_framework/mixins.py", line 40, in list
    queryset = self.filter_queryset(self.get_queryset())
  File "/opt/mayan-edms/lib/python3.6/site-packages/rest_framework/generics.py", line 68, in get_queryset
    % self.__class__.__name__
AssertionError: 'APIIndexTemplateListView' should either include a `queryset` attribute, or override the `get_queryset()` method.
/api/indexes/1/template/
...
Direct installation, ver. 3.4.16
User avatar
rosarior
Developer
Developer
Posts: 548
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: Rest API function: indexes_template_list

Post by rosarior »

Post Reply