Opened 2 hours ago
Last modified 107 minutes ago
#35784 assigned Uncategorized
Enhance django.shortcuts.redirect with two new types of redirect response codes
Reported by: | Lorenzo Peña | Owned by: | Lorenzo Peña |
---|---|---|---|
Component: | Uncategorized | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Other than 301 and 302 response codes for redirects, there is also:
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/308
Currently, Django is unaware of these.
Proposal:
- Add two new HTTP response classes for 307 and 308.
- Enhance
django.shortcuts.redirect
with a new keyword argumentpreserve_method
that, in combination with the existingpermanent
, decides which of the four redirect classes to use.
Change History (2)
comment:1 by , 2 hours ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:2 by , 107 minutes ago
Has patch: | set |
---|
Note:
See TracTickets
for help on using tickets.
https://github.com/django/django/pull/18616
Proof of concept until the ticket itself is approved. After that tests and documentation will be updated.