{{{
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.
* there should be a link to an example of each of the different ways in
the documentation (only "URL pattern name" is elucidated this way)
* the phrase "function reference" is confusing;
https://docs.djangoproject.com/en/dev/topics/http/urls/#passing-callable-
objects-instead-of-strings speaks of "passing objects" for example and the
same language should be used in both cases.
And what if one creates a URL pattern name that's the also the string
version of the view function name - which would win?
--
Ticket URL: <https://code.djangoproject.com/ticket/22220>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/22220#comment:1>
* status: new => assigned
* owner: nobody => bendavis78
--
Ticket URL: <https://code.djangoproject.com/ticket/22220#comment:2>
* has_patch: 0 => 1
Comment:
Here's my take on this: https://github.com/django/django/pull/2544
--
Ticket URL: <https://code.djangoproject.com/ticket/22220#comment:3>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"030dd4f72ca4d84c0a5e09ee625123d03651fdd1"]:
{{{
#!CommitTicketReference repository=""
revision="030dd4f72ca4d84c0a5e09ee625123d03651fdd1"
Fixed #22220 -- Added more examples to reverse() documention.
Thanks EvilDMP for the suggestions.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22220#comment:4>
Comment (by Tim Graham <timograham@…>):
In [changeset:"8c1d8a6215b123f2d0981f926db1f0405392ae5f"]:
{{{
#!CommitTicketReference repository=""
revision="8c1d8a6215b123f2d0981f926db1f0405392ae5f"
[1.7.x] Fixed #22220 -- Added more examples to reverse() documention.
Thanks EvilDMP for the suggestions.
Backport of 030dd4f72c from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22220#comment:5>
Comment (by Tim Graham <timograham@…>):
In [changeset:"e0930608230fc7e1f1a68d51296661200857658a"]:
{{{
#!CommitTicketReference repository=""
revision="e0930608230fc7e1f1a68d51296661200857658a"
[1.6.x] Fixed #22220 -- Added more examples to reverse() documention.
Thanks EvilDMP for the suggestions.
Backport of 030dd4f72c from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22220#comment:6>