Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#22220 closed Cleanup/optimization (fixed)

reverse() documentation

Reported by: Daniele Procida Owned by: Ben Davis
Component: Documentation Version: 1.6
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

https://docs.djangoproject.com/en/dev/ref/urlresolvers/#reverse:

reverse(viewname[, urlconf=None, args=None, kwargs=None, current_app=None])
viewname is either the function name (either a function reference, or the string version of the name, if you used that form in urlpatterns) or the URL pattern name.

I think this could be clearer.

And what if one creates a URL pattern name that's the also the string version of the view function name - which would win?

Change History (6)

comment:1 Changed 3 years ago by Aymeric Augustin

Triage Stage: UnreviewedAccepted

comment:2 Changed 2 years ago by Ben Davis

Owner: changed from nobody to Ben Davis
Status: newassigned

comment:3 Changed 2 years ago by Ben Davis

Has patch: set

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

Resolution: fixed
Status: assignedclosed

In 030dd4f72ca4d84c0a5e09ee625123d03651fdd1:

Fixed #22220 -- Added more examples to reverse() documention.

Thanks EvilDMP for the suggestions.

comment:5 Changed 2 years ago by Tim Graham <timograham@…>

In 8c1d8a6215b123f2d0981f926db1f0405392ae5f:

[1.7.x] Fixed #22220 -- Added more examples to reverse() documention.

Thanks EvilDMP for the suggestions.

Backport of 030dd4f72c from master

comment:6 Changed 2 years ago by Tim Graham <timograham@…>

In e0930608230fc7e1f1a68d51296661200857658a:

[1.6.x] Fixed #22220 -- Added more examples to reverse() documention.

Thanks EvilDMP for the suggestions.

Backport of 030dd4f72c from master

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