Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#17538 closed Bug (fixed)

default URLconf import is wrong

Reported by: matt@… Owned by: nobody
Component: Documentation Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Tutorial 3 has the following sentence:

By default, URLconfs have the following line up top:

from django.conf.urls.defaults import *

But in the urls.pl generated for me it did not have that but rather had:

from django.conf.urls.defaults import patterns, include, url

Change History (5)

comment:1 by Aymeric Augustin, 12 years ago

Resolution: worksforme
Status: newclosed

You are probably using a version of the docs that doesn't match your version of Django.

Last edited 12 years ago by Aymeric Augustin (previous) (diff)

comment:2 by Carl Meyer, 12 years ago

Resolution: worksforme
Status: closedreopened
Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

No, unlike those other reports, this one's an actual bug in the tutorial, both the trunk and the 1.3 version.

In both trunk and 1.3, the generated urls.py does not use "import *", and there is a built-in default for handler404 (so it's not necessary to have a handler404 in root urls.py at all). The "Write a 404 (page not found) view" section of tutorial part 3 is wrong in the 1.3 docs because it says the default line includes the "*"; in the dev docs the "*" was replaced with "patterns, url, include". But in both versions that section is simply wrong, because the default handler404 doesn't depend on any import at all anymore.

Thanks for the report, Matt!

comment:3 by Aymeric Augustin, 12 years ago

So much for late night triage :/ Please accept my apologies.

comment:4 by Carl Meyer, 12 years ago

Resolution: fixed
Status: reopenedclosed

In [17369]:

Fixed #17538 -- corrected the section in tutorial 3 about the handler404 default. Thanks matt at brozowski dot com for the report.

comment:5 by Carl Meyer, 12 years ago

In [17370]:

Fixed #17538 -- corrected the section in tutorial 3 about the handler404 default. Thanks matt at brozowski dot com for the report.

Backport of r17369 from trunk.

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