I know there are a few other posts about this out there and renaming my messages
app might solve the issue, but I don't want to change the name of my messages
app, and the label solution from this post just returns this error instead:
django.core.exceptions.ImproperlyConfigured: The app label 'email.messages' is not a valid Python identifier.
And the above error is after adding the label
and default_app_config
fields to MessagesConfig
like the other post suggests:
class MessagesConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'messages'
label = 'email.messages'
default_app_config = 'messages.apps.MessagesConfig'
My INSTALLED_APPS
in settings.py is as follows:
INSTALLED_APPS = [
# my apps
# 'accounts',
'subscribers',
'django_filters',
'accounts.apps.AccountsConfig',
'core',
'messages',
# 'messages.apps.MessagesConfig',
# 'email.messages',
# django apps
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
And I'm getting this error:
django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: messages
What's the actual workaround for this (other than renaming messages
to a different app name)? Thanks...