tags:

views:

55

answers:

1

I'm writing a quick Django module and want to check for another module. Is there's a shortcut to check if another module is in the installed_apps list in Django's settings?

+4  A: 
from settings import INSTALLED_APPS
if 'appname' in INSTALLED_APPS:
    print 'we have app'

And this way is somewhat how Django itself does. Also check the load_app method on the linked page.

inerte
I knew there was a nice simple syntax for it... I'm tired...
Gabriel Hurley