|Reported by:||EvilDMP||Owned by:||bendavis78|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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?
Change History (6)
comment:2 Changed 2 years ago by bendavis78
- Owner changed from nobody to bendavis78
- Status changed from new to assigned
comment:4 Changed 2 years ago by Tim Graham <timograham@…>
- Resolution set to fixed
- Status changed from assigned to closed