Opened 15 months ago

Closed 15 months ago

Last modified 15 months ago

#22832 closed Uncategorized (invalid)

admin.autodiscover() missing

Reported by: Matej Owned by: nobody
Component: Documentation Version: 1.6
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hi,
in the geoDjango tutorial: https://docs.djangoproject.com/en/dev/ref/contrib/gis/tutorial/
close to the bottom of the page there is this block of code:

from django.conf.urls import url, include
from django.contrib.gis import admin

urlpatterns = [

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

]

that should have also included the following line:
admin.autodiscover()

otherwise, the admin page says: you don't have permission to edit anything.

Matej

Change History (2)

comment:1 Changed 15 months ago by timo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

Please ​https://docs.djangoproject.com/en/1.6/ref/contrib/gis/tutorial/ if you are using Django 1.6. That line is no longer necessary in Django 1.7+.

comment:2 Changed 15 months ago by valberg

Due to the new app loading mechanism introduced in 1.7, django will do the autodiscover automatically.

See https://docs.djangoproject.com/en/1.7/ref/applications/ for more about the app loading process.

And the release notes https://docs.djangoproject.com/en/1.7/releases/1.7/#app-loading-refactor for information on what effects this new mechanism has.

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