[Django] #21895: Probably erroneous documentation about new contrib.admin and admin.autodiscover

13 views
Skip to first unread message

Django

unread,
Jan 29, 2014, 3:17:00 AM1/29/14
to django-...@googlegroups.com
#21895: Probably erroneous documentation about new contrib.admin and
admin.autodiscover
-------------------------------+-------------------------
Reporter: claus | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.7-alpha-1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+-------------------------
After upgrading a project from 1.6.1 to 1.7a1 I removed the call to
''autodiscover()'' from my URLconf, as indicated by
[https://docs.djangoproject.com/en/dev/releases/1.7/#app-loading-refactor
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.

[https://docs.djangoproject.com/en/dev/releases/1.7/#start-up-sequence
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/21895>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 29, 2014, 5:25:57 AM1/29/14
to django-...@googlegroups.com
#21895: Probably erroneous documentation about new contrib.admin and
admin.autodiscover
-------------------------------+---------------------------------------
Reporter: claus | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: 1.7-alpha-1
Severity: Normal | Resolution: worksforme
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+---------------------------------------
Changes (by mjtamlyn):

* status: new => closed
* needs_better_patch: => 0
* resolution: => worksforme
* needs_tests: => 0
* needs_docs: => 0


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/21895#comment:1>

Django

unread,
Jan 29, 2014, 7:08:29 AM1/29/14
to django-...@googlegroups.com
#21895: Probably erroneous documentation about new contrib.admin and
admin.autodiscover
-------------------------------+---------------------------------------
Reporter: claus | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: 1.7-alpha-1
Severity: Normal | Resolution: worksforme
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+---------------------------------------

Comment (by claus):

I see - thanks

--
Ticket URL: <https://code.djangoproject.com/ticket/21895#comment:2>

Reply all
Reply to author
Forward
0 new messages