Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

work with AppConfigs in INSTALLED_APPS #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion django_medusa/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@ def get_static_renderers():

# INSTALLED_APPS that aren't the project itself (also ignoring this
# django_medusa module)
try:
from django.apps import apps
installed_apps = [app.module.__name__ for app in apps.get_app_configs()]
except ImportError: # Fallback for Django < 1.7
installed_apps = settings.INSTALLED_APPS
modules_to_check += filter(
lambda x: (x != "django_medusa") and (x != settings_module),
settings.INSTALLED_APPS
installed_apps
)

for app in modules_to_check:
Expand Down