ellmetha / django-machina

A Django forum engine for building powerful community driven websites.
https://django-machina.readthedocs.org
BSD 3-Clause "New" or "Revised" License
589 stars 126 forks source link

«Application labels aren't unique» error while overriding #312

Closed AliIslamov closed 10 months ago

AliIslamov commented 10 months ago

Try to do overriding machina.apps.forum in according with:

https://django-machina.readthedocs.io/en/stable/customization/overriding_applications.html

and

https://django-machina.readthedocs.io/en/stable/customization/recipes/overriding_models.html

As result I have got new app «overrided.forum» in INSTALLED_APPS

But when I try to makemigrations, I get error:

raise ImproperlyConfigured( django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: forum

How can I fix it?

ellmetha commented 10 months ago

Hey @AliIslamov! Can I ask which application you tried to override? Did you make sure to remove the overridden application path from the INSTALLED_APPS setting? For example, if you overridden the machina.apps.forum_conversation application, then you must replace it by your overridden application Python path (eg. my_app.apps.forum_conversation).

AliIslamov commented 10 months ago

Hey @AliIslamov! Can I ask which application you tried to override? Did you make sure to remove the overridden application path from the INSTALLED_APPS setting? For example, if you overridden the machina.apps.forum_conversation application, then you must replace it by your overridden application Python path (eg. my_app.apps.forum_conversation).

I'm trying to override 'machina.apps.forum_conversation'.

And yes, I commented this app in INSTALLED_APPS by # and add new one 'apps.forum_conversation' which is located in the project root folder.

At this moment I have fixed this error but I have got a new one:

https://github.com/ellmetha/django-machina/issues/313