Remove code for old Django versions

This commit is contained in:
Dmitry Dygalo 2016-09-23 22:02:29 +02:00
parent 7ab4a587d9
commit 2533dc1306
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)