Opened 13 years ago
Closed 13 years ago
#16169 closed Cleanup/optimization (fixed)
Tutorial 2 with error in mysite/urls.py content
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Documentation | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
On piece of code of headline "Activate the admin site", the 3rd bold line to uncomment is different of startproject auto-generated urls.py:
documentation:
# Uncomment the next line to enable the admin: (r'^admin/', include(admin.site.urls)), )
auto-generated:
# Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), )
Documentation is suppressing the url function name.
Attachments (1)
Change History (7)
by , 13 years ago
Attachment: | 16169.patch added |
---|
comment:1 by , 13 years ago
Easy pickings: | set |
---|---|
Has patch: | set |
Triage Stage: | Unreviewed → Accepted |
Type: | Bug → Cleanup/optimization |
comment:2 by , 13 years ago
Patch needs improvement: | set |
---|
Maybe it's best to leave all the "import *
" fixes to #14675?
comment:3 by , 13 years ago
Patch needs improvement: | unset |
---|
You're right to say that this ticket overlaps with #14675, but it doesn't make sense to fix half of the present issue and hope that #14675 will fix the other half at some point in the future.
The whole point of this ticket is to make the tutorial consistent with the default template for urls.py. That's why I chose to fix the import lines too. Otherwise, inconsistencies will remain, and even small inconsistencies are unsettling for newcomers.
Since there is no way to track dependencies between tickets in Trac, we can't enforce which one will be committed first... When either this ticket or #14675 gets committed, let's update the patch on the other ticket if necessary.
comment:4 by , 13 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
OK, that makes sense, thanks!
Attached patch copies the latest version of the urls.py template in part 2 of the tutorial, and updates parts 2-4 wherever this file is described.
Strictly speaking, the current doc works, but it's better to be consistent.