#20204 closed Cleanup/optimization (fixed)
Better explanation of usage of url() in urlpatterns
Reported by: | Owned by: | Baptiste Mispelon | |
---|---|---|---|
Component: | Documentation | Version: | 1.5 |
Severity: | Normal | Keywords: | url() |
Cc: | bmispelon@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
On the URL dispatcher page (https://docs.djangoproject.com/en/1.5/topics/http/urls/), I found it confusing as to why some of the urlpatterns are tuples while others are calls to the url() function. It is not explained on this page - I had to dig around a little to understand. The url() function appears ten times on the page, but mostly in the code samples, not in the explanatory text. And the one place the url() function is mentioned in the text, it is not a hyperlink. It should link to https://docs.djangoproject.com/en/1.5/ref/urls/#django.conf.urls.url
Thanks!
Change History (6)
comment:1 by , 12 years ago
Cc: | added |
---|---|
Easy pickings: | set |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 12 years ago
Summary: | suggestion for improvement/clarification → Better explanation of usage of url() in urlpatterns |
---|
comment:3 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 12 years ago
Has patch: | set |
---|
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Seeing as the tutorial systematically uses
url
instead of the tuple notation, I decided to do the same in this documentation too.Here's the corresponding pull request: https://github.com/django/django/pull/994