i doing example states
here method
class feedviewset(viewsets.modelviewset): model = feed serializer_class = fullfeedserializer def get_queryset(self): user = request.user queryset = feed.objects.get_nearby(user) return queryset
when execute it, says request not defined .. isn't. example @ the rest framework's site haven't defined request. doing wrong?
the request object available (on either rest framework's class based views, or django's standard class based views) self.request
. you're missing self.
part of that.
Comments
Post a Comment