We have shopify app in django that is embedded in shopify. But this app is facing issues as an iframe in Safari Browser. I have referenced this doc https://pypi.org/project/django-iframetoolbox/ . But I didnt understand the order in which I have to include this in the MIDDLEWARE_CLASSES in settings.py.
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'csp.middleware.CSPMiddleware',
'shopify_app.middleware.LoginProtection',
'debug_toolbar.middleware.DebugToolbarMiddleware',
'iframetoolbox.middleware.IFrameFixMiddleware',
]
This is the current order in which I have given and this is giving me the following error:
raise ImproperlyConfigured( django.core.exceptions.ImproperlyConfigured: WSGI application 'shopify_django_app.wsgi.application' could not be loaded; Error importing module.