From 299874cbe1f3267aae61c91874d2512d6cf6e2d3 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Sun, 6 Mar 2011 05:55:12 +0000 Subject: [PATCH] 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 --- django/views/generic/edit.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/django/views/generic/edit.py b/django/views/generic/edit.py index ff87f7bd14..3cade522d4 100644 --- a/django/views/generic/edit.py +++ b/django/views/generic/edit.py @@ -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): """