#32642: RuntimeError: 'apps.core.apps' declares more than one default AppConfig 
on
custom admin setup
-----------------------------------------+------------------------
               Reporter:  Ron            |          Owner:  nobody
                   Type:  Bug            |         Status:  new
              Component:  contrib.admin  |        Version:  3.2
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 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

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.68805821a54256cbce95e34905219657%40djangoproject.com.

Reply via email to