f9e864c9fc
This resolves the following error when trying to run Horizon if it has been installed via "django-admin make_web_conf --wgi": AppRegistryNotReady: The translation infrastructure cannot be initialized before the apps registry is ready. Check that you don't make non-lazy gettext calls at import time. and is backwards-compatible with our currently supported versions. Closes-Bug: #1497986 Change-Id: I643058bb82f8e0f11b38ce0dd046773e91e053c3
14 lines
361 B
Python
14 lines
361 B
Python
#!/usr/bin/env python
|
|
import os
|
|
import sys
|
|
{% if ACTIVATE_THIS %}
|
|
|
|
activate_this = '{{ ACTIVATE_THIS }}'
|
|
execfile(activate_this, dict(__file__=activate_this))
|
|
{% endif %}
|
|
sys.path.insert(0, '{{ PROJECT_ROOT }}')
|
|
os.environ['DJANGO_SETTINGS_MODULE'] = '{{ DJANGO_SETTINGS_MODULE }}'
|
|
|
|
import django.core.wsgi
|
|
application = django.core.wsgi.get_wsgi_application()
|