Opened 4 years ago

Closed 4 years ago

#15262 closed (duplicate)

generic views don't populate request.POST when handling PUT

Reported by: kenth Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The new CBVs handle PUT as a synonym for POST, but django.http doesn't populate the request.POST & request.FILES for any verb except POST. I believe that PUT is being translated as an empty POST, which is not what I would have expected.

The CBV handling of PUT is in several places in django/views/generic/edit.py both in redirecting the put method definition and the get_form_kwargs() method.

Change History (2)

comment:1 Changed 4 years ago by kenth

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Version changed from 1.2 to SVN

comment:2 Changed 4 years ago by russellm

  • Component changed from Generic views to Core framework
  • Resolution set to duplicate
  • Status changed from new to closed

This isn't a generic view problem -- it's more fundamental than that. Django's HTTP handler doesn't contain good support for HTTP verbs that aren't GET or PUT.

This has been reported in the past as #12635.

Note: See TracTickets for help on using tickets.
Back to Top