misc: force loading of versions cache if {{statics_hash}} is used (#14621)
This commit is contained in:
parent
8f412c5373
commit
57cf20cb2c
|
@ -10,5 +10,12 @@ 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.TEMPLATE_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()
|
||||
|
|
|
@ -15,6 +15,9 @@ execfile('/usr/lib/hobo/debian_config_common.py')
|
|||
# add custom hobo agent module
|
||||
INSTALLED_APPS = ('hobo.agent.combo', ) + INSTALLED_APPS
|
||||
|
||||
# add statics_hash context processor
|
||||
TEMPLATE_CONTEXT_PROCESSORS.append('hobo.context_processors.statics_hash')
|
||||
|
||||
#
|
||||
# local settings
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue