#24145: Extend POST redirect error to be raised on PUT and PATCH
-----------------------------------+--------------------
Reporter: samuelcolvin | Owner: nobody
Type: New feature | Status: new
Component: contrib.redirects | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------
As per https://github.com/tomchristie/django-rest-framework/issues/2405
discussion it would be extremely helpful if the exception raised when POST
requests require a redirect
raise RuntimeError((""
"You called this URL via POST, but the URL doesn't end "
"in a slash and you have APPEND_SLASH set. Django can't "
"redirect to the slash URL while maintaining POST data. "
"Change your form to point to %s%s (note the trailing "
"slash), or set APPEND_SLASH=False in your Django "
"settings.") % (new_url[0], new_url[1]))
was extended to PUT and PATCH requests. PUT and PATCH requests have
associated data which is generally lost with a redirect.
Code:
https://github.com/django/django/blob/1.7.2/django/middleware/common.py#L75
--
Ticket URL: <https://code.djangoproject.com/ticket/24145>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/055.ed8a7648474b30ee8ac9bb2b5ef9a615%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.