django-contrib-comments icon indicating copy to clipboard operation
django-contrib-comments copied to clipboard

Can't use AppConfig in INSTALLED_APPS for custom comments app

Open jsma opened this issue 8 years ago • 2 comments

The import code here fails if using the full dotted path to an app config in INSTALLED_APPS and COMMENTS_APP.

jsma avatar Mar 09 '16 06:03 jsma

I am having the same problem.

RadoRado avatar Jun 09 '16 09:06 RadoRado

@jsma I managed to get it working.

In a Django shell, if you do:

from django.apps import apps

for app in apps.get_app_configs():
    print(app, app.name, app.label)

You will see the proper app.name that is required by is_installed

For example, if you have project.some_app.apps.SomeAppConfig in your INSTALLED_APPS then project.some_app is going to be the proper name that will work for COMMENTS_APP

RadoRado avatar Jun 09 '16 09:06 RadoRado