Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#20204 closed Cleanup/optimization (fixed)

Better explanation of usage of url() in urlpatterns

Reported by: dave.lampton@… 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 Baptiste Mispelon, 11 years ago

Cc: bmispelon@… added
Easy pickings: set
Triage Stage: UnreviewedAccepted

comment:2 by Claude Paroz, 11 years ago

Summary: suggestion for improvement/clarificationBetter explanation of usage of url() in urlpatterns

comment:3 by Baptiste Mispelon, 11 years ago

Owner: changed from nobody to Baptiste Mispelon
Status: newassigned

comment:4 by Baptiste Mispelon, 11 years ago

Has patch: set

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

comment:5 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

In c852d4568186b9a23af510762acb94003fc83e65:

Fixed #20204 - Consistent usage of url() in URL dispatcher documentation

Thanks Baptiste Mispelon for the patch and dave.lampton@ for the suggestion.

comment:6 by Tim Graham <timograham@…>, 11 years ago

In 82b5e10e6174d98564d2044da7202e9ed06529b6:

[1.5.x] Fixed #20204 - Consistent usage of url() in URL dispatcher documentation

Thanks Baptiste Mispelon for the patch and dave.lampton@ for the suggestion.

Backport of c852d45681 from master.

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