Opened 2 years ago

Closed 2 years ago

#33910 closed Uncategorized (invalid)

Clearly explain where 'django.urls.reverse' gets its name

Reported by: Daniel Wysocki Owned by: nobody
Component: Documentation Version: 4.1
Severity: Normal Keywords: documentation
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

As a newcomer to Django, I was a very confused where django.urls.reverse got its name. The documentation starts with

reverse()

If you need to use something similar to the url template tag in your code, Django provides the following function:

which doesn't really explain what's being reversed here.

After thinking for a while, it seems the idea is that you're mapping the view name to its URL, whereas the "default" case is mapping a URL to its associated view. This really needs to be stated clearly in the docs, as it's not very intuitive to a new user.

Change History (1)

comment:1 by Mariusz Felisiak, 2 years ago

Resolution: invalid
Status: newclosed

Docs contain more than this single sentence. There is a whole paragraph with examples and a full description of the reverse() function. I see no need for extra clarifications.

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