Commit 299874cb authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

Fixed #15560 -- Cleaned up some redundant post->put redirections in the...

Fixed #15560 -- Cleaned up some redundant post->put redirections in the class-based generic views. Thanks to maney for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15763 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 535dc08f
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -171,11 +171,6 @@ class BaseCreateView(ModelFormMixin, ProcessFormView):
        self.object = None
        return super(BaseCreateView, self).post(request, *args, **kwargs)

    # PUT is a valid HTTP verb for creating (with a known URL) or editing an
    # object, note that browsers only support POST for now.
    def put(self, *args, **kwargs):
        return self.post(*args, **kwargs)


class CreateView(SingleObjectTemplateResponseMixin, BaseCreateView):
    """
@@ -199,11 +194,6 @@ class BaseUpdateView(ModelFormMixin, ProcessFormView):
        self.object = self.get_object()
        return super(BaseUpdateView, self).post(request, *args, **kwargs)

    # PUT is a valid HTTP verb for creating (with a known URL) or editing an
    # object, note that browsers only support POST for now.
    def put(self, *args, **kwargs):
        return self.post(*args, **kwargs)


class UpdateView(SingleObjectTemplateResponseMixin, BaseUpdateView):
    """