#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)
Change History (4)
by , 16 years ago
Attachment: | 10978_inline_url_docs.diff added |
---|
comment:1 by , 15 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:2 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [11052]) Fixed #10978 -- Clarified that the include statement is part of the urlpattern definition. Thanks to swatermasysk for the suggestion.