Django ImportError: Module does not define attribute/class

  django, importerror, python

I am trying to add a custom/overridden AdminSite because I need a different template for the Admin. I did everything as the Docs said:

class NewAdminSite(AdminSite):
    index_template = 'admin/index.html'
    site_header = 'Administration'

admin_site = NewAdminSite(name='newadmin')

ofc I added admin_site.urls instead of to, created a custom AdminConfig in, and added that new AdminConfig to installed Apps instead of django.contrib.admin.

The Problem is that I now receive this:

AdminSiteClass = import_string(apps.get_app_config(‘admin’).default_site)

File "", line 24, in import_string
) from err

ImportError: Module "project.admin" does not define a "NewAdminSite" attribute/class

Source: Python Questions