﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32642	RuntimeError: 'apps.core.apps' declares more than one default AppConfig on custom admin setup	Ronny Vedrilla	nobody	"Hi!

I just migrated my project to django 3.2 and I get the following error:

> RuntimeError: 'apps.core.apps' declares more than one default AppConfig: 'AdminConfig', 'CustomAdminConfig'.

Here is my apps.py:


{{{
from django.contrib.admin.apps import AdminConfig

class CustomAdminConfig(AdminConfig):
    default_site = 'apps.core.admin.site.CustomAdminSite'
}}}

To narrow down the bug I renamed the import:

{{{
from django.contrib.admin.apps import AdminConfig as XAdminConfig

class CustomAdminConfig(XAdminConfig):
    default_site = 'apps.core.admin.site.CustomAdminSite'
}}}

Then the error changes to:

> RuntimeError: 'apps.core.apps' declares more than one default AppConfig: 'XAdminConfig', 'CustomAdminConfig'.

So I guess the new apps autoloader is following the import statement.

I looked at the docs (https://docs.djangoproject.com/en/3.2/ref/contrib/admin/#overriding-the-default-admin-site) but the described way seems like the stuff I did.

I honestly hope, I'm not making any stupid mistakes here.

Best regards and thx!
Ronny"	Bug	closed	contrib.admin	3.2	Normal	invalid		Julien Chiron	Unreviewed	0	0	0	0	0	0
