[Django] #33910: Clearly explain where 'django.urls.reverse' gets its name

6 views
Skip to first unread message

Django

unread,
Aug 9, 2022, 4:41:29 PM8/9/22
to django-...@googlegroups.com
#33910: Clearly explain where 'django.urls.reverse' gets its name
-----------------------------------------+-------------------------------
Reporter: dwysocki | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 4.1
Severity: Normal | Keywords: documentation
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+-------------------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/33910>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 10, 2022, 1:45:12 AM8/10/22
to django-...@googlegroups.com
#33910: Clearly explain where 'django.urls.reverse' gets its name
--------------------------------+--------------------------------------
Reporter: Daniel Wysocki | Owner: nobody
Type: Uncategorized | Status: closed
Component: Documentation | Version: 4.1
Severity: Normal | Resolution: invalid

Keywords: documentation | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => invalid


Comment:

[https://docs.djangoproject.com/en/stable/ref/urlresolvers/#django.urls.reverse
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/33910#comment:1>

Reply all
Reply to author
Forward
0 new messages