Jd16
Jd16

Reputation: 417

How to allow DELETE request in the list-view of Django REST framework ? Is it possible?

Is it possible to delete List of objects from Django rest framework list-view ? I am passing list of ids of objects [1,2] in delete request and its showing

{u'detail': u'Method "DELETE" not allowed.'}.

Allowed methods at List-view are :GET, POST, HEAD, OPTIONS

I want to add DELETE to this allowed reuqest.

Upvotes: 1

Views: 693

Answers (1)

Daniel Hepper
Daniel Hepper

Reputation: 29967

Out of the box, Django Rest Framework does not support bulk operations.

You will have to write some custom code for that. There is the third party package Django REST framework bulk which might be a good starting point.

Upvotes: 1

Related Questions