mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 09:36:49 +03:00
Remove deprecated generic views.
`MultipleObjectAPIView` and `SingleObjectAPIView` are no longer required.
This commit is contained in:
parent
72c0811576
commit
ce7b2cded9
|
@ -442,25 +442,3 @@ class RetrieveUpdateDestroyAPIView(mixins.RetrieveModelMixin,
|
|||
|
||||
def delete(self, request, *args, **kwargs):
|
||||
return self.destroy(request, *args, **kwargs)
|
||||
|
||||
|
||||
# Deprecated classes
|
||||
|
||||
class MultipleObjectAPIView(GenericAPIView):
|
||||
def __init__(self, *args, **kwargs):
|
||||
warnings.warn(
|
||||
'Subclassing `MultipleObjectAPIView` is deprecated. '
|
||||
'You should simply subclass `GenericAPIView` instead.',
|
||||
DeprecationWarning, stacklevel=2
|
||||
)
|
||||
super(MultipleObjectAPIView, self).__init__(*args, **kwargs)
|
||||
|
||||
|
||||
class SingleObjectAPIView(GenericAPIView):
|
||||
def __init__(self, *args, **kwargs):
|
||||
warnings.warn(
|
||||
'Subclassing `SingleObjectAPIView` is deprecated. '
|
||||
'You should simply subclass `GenericAPIView` instead.',
|
||||
DeprecationWarning, stacklevel=2
|
||||
)
|
||||
super(SingleObjectAPIView, self).__init__(*args, **kwargs)
|
||||
|
|
Loading…
Reference in New Issue
Block a user