1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #20478 – Added support for HTTP PATCH method in generic views.

This commit is contained in:
Krzysztof Jurewicz
2013-05-21 18:01:29 +02:00
parent 0e51d8eb66
commit ee8b810b97
4 changed files with 14 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ class View(object):
dispatch-by-method and simple sanity checking.
"""
http_method_names = ['get', 'post', 'put', 'delete', 'head', 'options', 'trace']
http_method_names = ['get', 'post', 'put', 'patch', 'delete', 'head', 'options', 'trace']
def __init__(self, **kwargs):
"""
@@ -206,3 +206,6 @@ class RedirectView(View):
def put(self, request, *args, **kwargs):
return self.get(request, *args, **kwargs)
def patch(self, request, *args, **kwargs):
return self.get(request, *args, **kwargs)