Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#10978 closed (fixed)

1.0 Url Include Documenation

Reported by: Scott Watermasysk Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords: urls, urlpatterns, tutorial
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I found the documentation on setting up an include file for urls a little confusing for a new django user: http://docs.djangoproject.com/en/1.0/intro/tutorial03/#intro-tutorial03

The part I got tripped up on was code sample:

(r'polls/', include('mysite.polls.urls')),

It was not apparent to me until after I read the docs here http://docs.djangoproject.com/en/dev/topics/http/urls/ that the include was supposed to be part of the urlpatterns.

I mistakenly just added the include statement above and was greated with the error message, "'module' object has no attribute 'urlpatterns'". It could be just me, but I would recommend either expanding the code sample to include the urlpatterns or add a note about this potential error message.

Attachments (1)

10978_inline_url_docs.diff (762 bytes ) - added by kfricovsky 16 years ago.

Download all attachments as: .zip

Change History (4)

by kfricovsky, 16 years ago

Attachment: 10978_inline_url_docs.diff added

comment:1 by Chris Beaven, 16 years ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Russell Keith-Magee, 15 years ago

Resolution: fixed
Status: newclosed

(In [11052]) Fixed #10978 -- Clarified that the include statement is part of the urlpattern definition. Thanks to swatermasysk for the suggestion.

comment:3 by Russell Keith-Magee, 15 years ago

(In [11064]) [1.0.X] Fixed #10978 -- Clarified that the include statement is part of the urlpattern definition. Thanks to swatermasysk for the suggestion.

Merge of r11052 from trunk.

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