passbook: implement dynamic URL loading
This commit is contained in:
@ -7,7 +7,7 @@ log:
|
||||
level:
|
||||
console: DEBUG
|
||||
file: DEBUG
|
||||
file: NUL
|
||||
file: /dev/null
|
||||
syslog:
|
||||
host: 127.0.0.1
|
||||
port: 514
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user