Opened 5 years ago

Closed 5 years ago

#31541 closed Cleanup/optimization (fixed)

Improve documentation of django.contrib.redirects.

Reported by: Adam Johnson Owned by: Yash Saini
Component: contrib.redirects Version: dev
Severity: Normal Keywords:
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

Description (last modified by Mariusz Felisiak)

I think there are a couple small improvements that could be made to the docs here:

  • The "Via the Python API" section could do with a simple shell example for creating a Redirect, since otherwise the fields aren't mentioned in the docs. I also imagine it might be used by relatively new users who aren't confident with the ORM.
  • The Redirect.new_path field's help_text states full URL starting with “http://””. This doesn't mention the now-more-common https://, nor the fact that arbitrary protocols are technically supported, such as onion://. Perhaps full URL starting with a scheme such as https://

Change History (11)

comment:1 by Mark Dawson, 5 years ago

I'd be happy to try to improve some of these docs

Version 0, edited 5 years ago by Mark Dawson (next)

comment:2 by Mariusz Felisiak, 5 years ago

Description: modified (diff)
Summary: Improve documentation of django.contrib.redirectsImprove documentation of django.contrib.redirects.
Triage Stage: UnreviewedAccepted

comment:3 by Adam Johnson, 5 years ago

@mark no I didn't. But also this came from a Twitter conversation and the Djangonaut there was also interested in making a PR: https://twitter.com/Wildvasa/status/1257931805988134922 :)

comment:4 by Yash Saini, 5 years ago

Owner: changed from nobody to Yash Saini
Status: newassigned

comment:6 by Adam Johnson, 5 years ago

Patch needs improvement: set

comment:7 by Mariusz Felisiak, 5 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:8 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In a8c0246:

Refs #31541 -- Added example of creating Redirect objects to redirects app docs.

comment:9 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In d5118d2a:

Refs #31541 -- Updated Redirect.new_path.help_text.

comment:10 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 648f6ff:

[3.1.x] Refs #31541 -- Added example of creating Redirect objects to redirects app docs.

Backport of a8c0246ece0716cea2ea6c1b313d4d93a10ee333 from master

comment:11 by Mariusz Felisiak, 5 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.
Back to Top