Matthew Schinckel  committed bfee822

Redirect from POST to DELETE if form contains an element _delete with contents DELETE.

  • Participants
  • Parent commits d6e28a2
  • Branches default

Comments (0)

Files changed (1)

File repose/

         Unlike PUT, this request will fail if there is no resource at this URI. For
         instance, if someone else deleted it...
+        if request.POST.get('_delete', None) == "DELETE":
+            return self.delete(request, *args, **kwargs)
         obj = self.get_object()
         if not self.can_update(obj):
             raise http.Forbidden()