Add 307 and 308 redirect response codes to django.shortcuts.redirect
Other than 301 and 302 response codes for redirects, there is also:
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 argument preserve_method that, in combination with the existing permanent, decides which of the four redirect classes to use.
Change History
(13)
| Owner: |
set to Lorenzo Peña
|
| Status: |
new → assigned
|
| Component: |
Uncategorized → HTTP handling
|
| Summary: |
Enhance django.shortcuts.redirect with two new types of redirect response codes → Add 307 and 308 redirect response codes to django.shortcuts.redirect
|
| Triage Stage: |
Unreviewed → Accepted
|
| Type: |
Uncategorized → New feature
|
| Patch needs improvement: |
set
|
| Patch needs improvement: |
unset
|
| Needs documentation: |
set
|
| Needs tests: |
set
|
| Patch needs improvement: |
set
|
| Needs documentation: |
unset
|
| Needs tests: |
unset
|
| Patch needs improvement: |
unset
|
| Patch needs improvement: |
set
|
| Patch needs improvement: |
unset
|
| Triage Stage: |
Accepted → Ready for checkin
|
| Triage Stage: |
Ready for checkin → Accepted
|
| Triage Stage: |
Accepted → Ready for checkin
|
| Resolution: |
→ fixed
|
| Status: |
assigned → closed
|
https://github.com/django/django/pull/18616
Proof of concept until the ticket itself is approved. After that tests and documentation will be updated.