lib: add ifapp-like function

This commit is contained in:
Jens Langhammer 2018-11-22 13:12:36 +01:00
parent 20752b4382
commit 849f9c9251

View file

@ -23,3 +23,8 @@ def get_apps():
for _app in apps.get_app_configs():
if _app.name.startswith('passbook'):
yield _app
def app(name):
"""Return true if app with `name` is enabled"""
from django.conf import settings
return name in settings.INSTALLED_APPS