Opened 3 years ago

Closed 3 years ago

#21354 closed Bug (fixed)

'contrib.redirects' documentation doesn't say whether it's a 301 or 302

Reported by: glarrain Owned by: bouke
Component: contrib.redirects Version: master
Severity: Normal Keywords: documentation
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


In it should be said that the redirects are permanent (i.e. 301), not 302. Although one could guess that's the reasonable behavior, better make it explicit. On the other hand, at the end of the page there is a mention of how to change the response classes used, and that the default value of RedirectFallbackMiddleware.response_redirect_class is HttpResponsePermanentRedirect, so it could be inferred that the default behavior is return a 301 but again, not explicit enough.

Change History (4)

comment:1 Changed 3 years ago by bmispelon

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

I agree, this should be mentionned more prominently (maybe even in the first paragraph).

comment:2 Changed 3 years ago by bouke

  • Has patch set
  • Owner changed from nobody to bouke
  • Status changed from new to assigned

comment:3 Changed 3 years ago by claudep

  • Triage Stage changed from Accepted to Ready for checkin

comment:4 Changed 3 years ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In 073b974e6613adc88cade7d34af701e52e2cc8fd:

Fixed #21354 -- Documented contrib.redirects defaults to 301 redirects

Thanks glarrain for the suggestion.

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