Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #15560 -- Cleaned up some redundant post->put redirections in t…

…he 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
  • Loading branch information...
commit 299874cbe1f3267aae61c91874d2512d6cf6e2d3 1 parent 535dc08
@freakboy3742 freakboy3742 authored
Showing with 0 additions and 10 deletions.
  1. +0 −10 django/views/generic/edit.py
View
10 django/views/generic/edit.py
@@ -171,11 +171,6 @@ def post(self, request, *args, **kwargs):
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 @@ def post(self, request, *args, **kwargs):
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):
"""
Please sign in to comment.
Something went wrong with that request. Please try again.