django / django-contrib-comments

BSD 3-Clause "New" or "Revised" License
613 stars 197 forks source link

Can't use AppConfig in INSTALLED_APPS for custom comments app #73

Open jsma opened 8 years ago

jsma commented 8 years ago

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

RadoRado commented 8 years ago

I am having the same problem.

RadoRado commented 8 years ago

@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