Commit b82ec540 by Dmitry Dygalo Committed by Tom Christie

Remove code for old Django versions (#4513)

parent 7ab4a587
...@@ -126,7 +126,6 @@ class APIView(View): ...@@ -126,7 +126,6 @@ class APIView(View):
'Use `.all()` or call `.get_queryset()` instead.' 'Use `.all()` or call `.get_queryset()` instead.'
) )
cls.queryset._fetch_all = force_evaluation cls.queryset._fetch_all = force_evaluation
cls.queryset._result_iter = force_evaluation # Django <= 1.5
view = super(APIView, cls).as_view(**initkwargs) view = super(APIView, cls).as_view(**initkwargs)
view.cls = cls view.cls = cls
......
...@@ -79,10 +79,6 @@ class ViewSetMixin(object): ...@@ -79,10 +79,6 @@ class ViewSetMixin(object):
handler = getattr(self, action) handler = getattr(self, action)
setattr(self, method, handler) 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 # And continue as usual
return self.dispatch(request, *args, **kwargs) return self.dispatch(request, *args, **kwargs)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment