mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-10 19:56:59 +03:00
Remove code for old Django versions (#4513)
This commit is contained in:
parent
7ab4a587d9
commit
b82ec540ad
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user