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:

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 (2)

comment:1 by Lorenzo Peña, 2 hours ago

Owner: set to Lorenzo Peña
Status: newassigned

comment:2 by Lorenzo Peña, 107 minutes ago

Has patch: set

https://github.com/django/django/pull/18616

Proof of concept until the ticket itself is approved. After that tests and documentation will be updated.

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