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
This commit is contained in:
Russell Keith-Magee 2011-03-06 05:55:12 +00:00
parent 535dc08fcf
commit 299874cbe1
1 changed files with 0 additions and 10 deletions

View File

@ -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):
"""