combo/combo/wsgi.py

22 lines
820 B
Python

"""
WSGI config for combo 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.6/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "combo.settings")
from django.conf import settings
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
if 'hobo.context_processors.statics_hash' in settings.TEMPLATES[0]['OPTIONS']['context_processors']:
# initialize versions as soon as possible as it may be used in most
# requests via the statics_hash template var and we prefer not to
# load the information during a user request.
from hobo.scrutiny.wsgi.middleware import VersionMiddleware
VersionMiddleware.get_packages_version()