django-machina icon indicating copy to clipboard operation
django-machina copied to clipboard

get_class does not work with AppConfig definition in INSTALLED_APPS

Open BoPeng opened this issue 4 years ago • 0 comments

I override forum_conversation, everything worked fine until I changed

INSTALLED_APPS = [
    'myapp.forum_conversation'
]

to

INSTALLED_APPS = [
    'myapp.forum_conversation.apps.ForumConversationAppConfig'
]

because

https://github.com/ellmetha/django-machina/blob/d60dfb3a72e234c7823f69a7f0f46224af8604c7/machina/core/loading.py#L101-L109

does not consider this case.

Note that I am trying to use the apps definition because I would like to import myapp.forum_conversation.signals in apps.py

class ForumMemberAppConfig(BaseForumMemberAppConfig):
    name = 'myapp.forum_member'

    def ready(self):
        from myapp.forum_member import signals

so that the signals would be available when I am running tests.

BoPeng avatar Apr 11 '21 22:04 BoPeng