Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#21895 closed Bug (worksforme)

Probably erroneous documentation about new contrib.admin and admin.autodiscover

Reported by: Claus Conrad Owned by: nobody
Component: Documentation Version: 1.7-alpha-1
Severity: Normal Keywords:
Cc: Claus Conrad Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

After upgrading a project from 1.6.1 to 1.7a1 I removed the call to autodiscover() from my URLconf, as indicated by this section in the release notes:

The admin automatically calls autodiscover() when Django starts. You can consequently remove this line from your URLconf.

This does not work in my upgraded application; without the call to autodiscover superusers don't have any permissions in the admin interface. In case the above paragraph only applies to apps created using 1.7a1, then mentioning the removal of code seems at least ambiguous.

Later on the release notes read:

django.contrib.admin will now automatically perform autodiscovery of admin modules in installed applications. To prevent it, change your INSTALLED_APPS to contain 'django.contrib.admin.apps.SimpleAdminConfig' instead of 'django.contrib.admin'.

I am not sure if this is correct, after reading some posts on the developers list about this it seems to me that django.contrib.admin should read django.contrib.admin.apps.AdminConfig here, if one wants to rely on autodiscovery - unfortunately I haven't had time to try this in my code yet.

Change History (2)

comment:1 by Marc Tamlyn, 11 years ago

Resolution: worksforme
Status: newclosed

This is an issue with 1.7alpha1 compared to current master. For the alpha, you would need django.contrib.admin.apps.AdminConfig, but in master you will not.

comment:2 by Claus Conrad, 11 years ago

I see - thanks

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