Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
whitenoise = False
else:
whitenoise_version = tuple(map(
int, getattr(whitenoise, '__version__', '0').split('.')))
# WhiteNoise < 2.0.1 does not support Python 2.6
if sys.version_info[:2] < (2, 7):
if whitenoise_version < (2, 0, 1):
whitenoise = False
# Configure WhiteNoise >= 3.2 as middleware from app_settings.py
# http://whitenoise.evans.io/en/stable/changelog.html#v4-0
if whitenoise_version >= (3, 2):
whitenoise = False
if whitenoise:
from whitenoise.django import DjangoWhiteNoise
application = DjangoWhiteNoise(application)
prefix = "/".join((settings.URL_PREFIX.strip('/'), 'static'))
for directory in settings.STATICFILES_DIRS:
application.add_files(directory, prefix=prefix)
for app_path in settings.INSTALLED_APPS:
module = import_module(app_path)
directory = os.path.join(os.path.dirname(module.__file__), 'static')
if os.path.isdir(directory):
application.add_files(directory, prefix=prefix)
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "media-bias.settings")
application = get_wsgi_application()
application = DjangoWhiteNoise(application)
WSGI config for djello project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "djello.settings")
application = DjangoWhiteNoise(get_wsgi_application())
import os
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "fakester.settings")
application = get_wsgi_application()
application = DjangoWhiteNoise(application)
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mywebgis.settings")
application = get_wsgi_application()
application = DjangoWhiteNoise(application)
"""
WSGI config for indigo project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "indigo.settings")
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise
application = get_wsgi_application()
application = DjangoWhiteNoise(application)
import os
# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
# if running multiple sites in the same mod_wsgi process. To fix this, use
# mod_wsgi daemon mode with each site in its own daemon process, or use
os.environ["DJANGO_SETTINGS_MODULE"] = "shortener.settings.production"
# This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if the WSGI_APPLICATION
# setting points here.
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise
application = get_wsgi_application()
application = DjangoWhiteNoise(application)
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise
application = get_wsgi_application()
application = DjangoWhiteNoise(application)
import os
import sys
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise
# This allows easy placement of apps within the interior
# djmyblog directory.
app_path = os.path.abspath(os.path.join(
os.path.dirname(os.path.abspath(__file__)), os.pardir))
sys.path.append(os.path.join(app_path, 'wagtail_react_blog'))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.production")
application = get_wsgi_application()
application = DjangoWhiteNoise(application)
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "simplestore.settings")
application = get_wsgi_application()
application = DjangoWhiteNoise(application)