diff --git a/filebrowser_safe/functions.py b/filebrowser_safe/functions.py index 783299a..fbb8f73 100644 --- a/filebrowser_safe/functions.py +++ b/filebrowser_safe/functions.py @@ -5,13 +5,14 @@ from time import gmtime, localtime, strftime, time from django.conf import settings as dj_settings +from django.core.exceptions import AppRegistryNotReady from django.core.files.storage import default_storage from filebrowser_safe import settings as fb_settings try: from mezzanine.utils.sites import current_site_id -except ImportError: +except (AppRegistryNotReady, ImportError) as e: # TODO: filebrowser-safe should not rely on `current_site_id` at all since its # provided by Mezzanine. #