Hello everybody,
I'm using a custom AdminSite subclass. But since the update from Django 2.0.13 to 2.2.12 I'm having problems to get it recognized when creating or running migrations.
This is what I have in hal/admin.py:
from django.contrib import admin
class HalAdminSite(admin.AdminSite):
# ...
admin_site = HalAdminSite()
admin_site.register(Profile)
# ...
This is what I have in hal/apps.py:
from django.contrib.admin.apps import AdminConfig
class HalAdminConfig(AdminConfig):
default_site = 'hal.admin.HalAdminSite'
This is what I have in settings.py:
INSTALLED_APPS = [
# ....
'hal.apps.HalAdminConfig',
# ...
]
Nevertheless I get the following exceptions when running makemigrations or migrate:
AttributeError: module 'hal.admin' has no attribute 'HalAdminSite'
ImportError: Module "hal.admin" does not define a "HalAdminSite" attribute/class
Any hints about how I can fix this? That would be really appreciated!.
Greetings
Oliver