Skip to content
Snippets Groups Projects
Unverified Commit a3f7f1ff authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Allow apps to define additional installed apps.

parent 1ba348e6
No related branches found
No related tags found
No related merge requests found
from importlib import import_module
import pkgutil
from typing import Sequence
......@@ -11,7 +12,11 @@ def get_app_packages() -> Sequence:
except ImportError:
return []
pkgs = ['biscuit.apps.%s' % i[1]
for i in pkgutil.iter_modules(biscuit.apps.__path__)]
pkgs = []
for pkg in pkgutil.iter_modules(biscuit.apps.__path__):
mod = import_module('biscuit.apps.%s' % pkg[1])
pkgs += getattr(mod, 'INSTALLED_APPS', [])
pkgs += ['biscuit.apps.%s' % pkg[1]]
return pkgs
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment