Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#13563 closed (fixed)

geodjango tutorial broken for 1.2.x

Reported by: TerryBrown <terry_n_brown@…> Owned by: nobody
Component: Documentation Version: 1.2
Severity: Keywords: geodjango urls.py tutorial
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The geodjango tutorial at http://docs.djangoproject.com/en/dev/ref/contrib/gis/tutorial/ says urls.py should read

...
urlpatterns = patterns('',
                       (r'^admin/(.*)', include(admin.site.urls)),
                       )

but that doesn't work for 1.2.1, whereas

...
urlpatterns = patterns('',
                       (r'^admin/(.*)', admin.site.root),
                       )

does.

Change History (3)

comment:1 Changed 5 years ago by kmtracey

  • Component changed from GIS to Documentation
  • milestone changed from 1.2 to 1.3
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

The pattern should actually be:

    (r'^admin/', include(admin.site.urls)),

The admin.site.root form is older and on its way to being deprecated. What's currently in the tutorial is an invalid mixture of the older and newer recommended patterns.

comment:2 Changed 5 years ago by jacob

  • Resolution set to fixed
  • Status changed from new to closed

(In [13293]) Fixed #13563, a typo in the GeoDjango tutorial.

comment:3 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

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