You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I setup everything following the README and am getting this error when requesting the basic ajax example http://localhost:8002/basic
(tutovenv) nick@dose (master) ~/django-api-rest-and-angular\> ./manage.py runserver localhost:8002
Performing system checks...
System check identified no issues (5 silenced).
March 18, 2016 - 05:55:50
Django version 1.9.2, using settings 'example.settings'
Starting development server at http://localhost:8002/
Quit the server with CONTROL-C.
[18/Mar/2016 05:55:58] "GET /basic HTTP/1.1" 200 1104
[18/Mar/2016 05:55:58] "GET /static/js/script.js HTTP/1.1" 304 0
Internal Server Error: /api/posts
Traceback (most recent call last):
File "/home/nick/django-api-rest-and-angular/tutovenv/lib/python3.5/site-packages/django/core/handlers/base.py", line 149, in get_response
response = self.process_exception_by_middleware(e, request)
File "/home/nick/django-api-rest-and-angular/tutovenv/lib/python3.5/site-packages/django/core/handlers/base.py", line 147, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/nick/django-api-rest-and-angular/tutovenv/lib/python3.5/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(*args, **kwargs)
File "/home/nick/django-api-rest-and-angular/tutovenv/lib/python3.5/site-packages/django/views/generic/base.py", line 68, in view
return self.dispatch(request, *args, **kwargs)
File "/home/nick/django-api-rest-and-angular/tutovenv/lib/python3.5/site-packages/rest_framework/views.py", line 466, in dispatch
response = self.handle_exception(exc)
File "/home/nick/django-api-rest-and-angular/tutovenv/lib/python3.5/site-packages/rest_framework/views.py", line 463, in dispatch
response = handler(request, *args, **kwargs)
File "/home/nick/django-api-rest-and-angular/tutovenv/lib/python3.5/site-packages/rest_framework/generics.py", line 243, in get
return self.list(request, *args, **kwargs)
File "/home/nick/django-api-rest-and-angular/tutovenv/lib/python3.5/site-packages/rest_framework/mixins.py", line 40, in list
queryset = self.filter_queryset(self.get_queryset())
File "/home/nick/django-api-rest-and-angular/tutovenv/lib/python3.5/site-packages/rest_framework/generics.py", line 67, in get_queryset
% self.__class__.__name__
AssertionError: 'PostList' should either include a `queryset` attribute, or override the `get_queryset()` method.
I thought maybe the Django version pulled in by requirements.txt was too new (it pulled 1.9.4), so I uninstalled that using pip and installed Django==1.9.2 instead. That didn't help, same error.
EDIT: also tried djangorestframework 3.3.0 instead of 3.3.3, same error
Not sure what to make of it (not an expert obviously).
The text was updated successfully, but these errors were encountered:
I setup everything following the README and am getting this error when requesting the basic ajax example http://localhost:8002/basic
I thought maybe the Django version pulled in by requirements.txt was too new (it pulled 1.9.4), so I uninstalled that using pip and installed Django==1.9.2 instead. That didn't help, same error.
EDIT: also tried djangorestframework 3.3.0 instead of 3.3.3, same error
Not sure what to make of it (not an expert obviously).
The text was updated successfully, but these errors were encountered: