Code

Opened 13 months ago

Closed 12 months ago

Last modified 12 months ago

#20204 closed Cleanup/optimization (fixed)

Better explanation of usage of url() in urlpatterns

Reported by: dave.lampton@… Owned by: bmispelon
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!

Attachments (0)

Change History (6)

comment:1 Changed 13 months ago by bmispelon

  • Cc bmispelon@… added
  • Easy pickings set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 13 months ago by claudep

  • Summary changed from suggestion for improvement/clarification to Better explanation of usage of url() in urlpatterns

comment:3 Changed 13 months ago by bmispelon

  • Owner changed from nobody to bmispelon
  • Status changed from new to assigned

comment:4 Changed 13 months ago by bmispelon

  • 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 12 months ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

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 12 months 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.