Remove code for old Django versions (#4513)

This commit is contained in:
Dmitry Dygalo 2016-09-24 00:03:02 +02:00 committed by Tom Christie
parent 7ab4a587d9
commit b82ec540ad
2 changed files with 0 additions and 5 deletions

View File

@ -126,7 +126,6 @@ class APIView(View):
'Use `.all()` or call `.get_queryset()` instead.'
)
cls.queryset._fetch_all = force_evaluation
cls.queryset._result_iter = force_evaluation # Django <= 1.5
view = super(APIView, cls).as_view(**initkwargs)
view.cls = cls

View File

@ -79,10 +79,6 @@ class ViewSetMixin(object):
handler = getattr(self, action)
setattr(self, method, handler)
# Patch this in as it's otherwise only present from 1.5 onwards
if hasattr(self, 'get') and not hasattr(self, 'head'):
self.head = self.get
# And continue as usual
return self.dispatch(request, *args, **kwargs)