Ticket #15560: generic-views.patch

File generic-views.patch, 1.1 KB (added by maney, 8 years ago)

trivial patch included

  • django/views/generic/edit.py

    diff --git a/django/views/generic/edit.py b/django/views/generic/edit.py
    index ff87f7b..3cade52 100644
    a b class BaseCreateView(ModelFormMixin, ProcessFormView): 
    171171        self.object = None
    172172        return super(BaseCreateView, self).post(request, *args, **kwargs)
    173173
    174     # PUT is a valid HTTP verb for creating (with a known URL) or editing an
    175     # object, note that browsers only support POST for now.
    176     def put(self, *args, **kwargs):
    177         return self.post(*args, **kwargs)
    178 
    179174
    180175class CreateView(SingleObjectTemplateResponseMixin, BaseCreateView):
    181176    """
    class BaseUpdateView(ModelFormMixin, ProcessFormView): 
    199194        self.object = self.get_object()
    200195        return super(BaseUpdateView, self).post(request, *args, **kwargs)
    201196
    202     # PUT is a valid HTTP verb for creating (with a known URL) or editing an
    203     # object, note that browsers only support POST for now.
    204     def put(self, *args, **kwargs):
    205         return self.post(*args, **kwargs)
    206 
    207197
    208198class UpdateView(SingleObjectTemplateResponseMixin, BaseUpdateView):
    209199    """
Back to Top