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

Add additional apps only once.

parent a3f7f1ff
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,12 @@ def get_app_packages() -> Sequence:
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]]
# Add additional apps defined in module's INSTALLED_APPS constant
additional_apps = getattr(mod, 'INSTALLED_APPS', [])
for app in additional_apps:
if not app in pkgs:
pkgs.append(app)
pkgs.append('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