Opened 10 years ago

Closed 10 years ago

Last modified 10 years 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 by Tim Graham, 10 years ago

Resolution: invalid
Status: newclosed

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 by Vidir Valberg Gudmundsson, 10 years ago

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