Opened 13 years ago

Closed 13 years ago

Last modified 13 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, 13 years ago

Resolution: worksforme
Status: newclosed

You are using the development version of the docs with a previous version of Django.

See of #17505, #17456, #17353, and several others.

Version 0, edited 13 years ago by Aymeric Augustin (next)

comment:2 by Carl Meyer, 13 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, 13 years ago

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

comment:4 by Carl Meyer, 13 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, 13 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