Opened 3 years ago

Closed 3 years ago

Last modified 3 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 Changed 3 years ago by Baptiste Mispelon

Cc: bmispelon@… added
Easy pickings: set
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

comment:2 Changed 3 years ago by Claude Paroz

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

comment:3 Changed 3 years ago by Baptiste Mispelon

Owner: changed from nobody to Baptiste Mispelon
Status: newassigned

comment:4 Changed 3 years ago by Baptiste Mispelon

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 Changed 3 years ago by Tim Graham <timograham@…>

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 Changed 3 years ago by Tim Graham <timograham@…>

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