passbook: implement dynamic URL loading

This commit is contained in:
Jens Langhammer
2018-11-22 10:28:13 +01:00
parent b5bc371a04
commit 61b79e90e5
9 changed files with 37 additions and 20 deletions

View File

@ -7,7 +7,7 @@ log:
level:
console: DEBUG
file: DEBUG
file: NUL
file: /dev/null
syslog:
host: 127.0.0.1
port: 514

View File

@ -15,3 +15,11 @@ def path_to_class(path):
package = '.'.join(parts[:-1])
_class = getattr(import_module(package), parts[-1])
return _class
def get_apps():
"""Get list of all passbook apps"""
from django.apps.registry import apps
for _app in apps.get_app_configs():
if _app.name.startswith('passbook'):
yield _app