Fix import error by calling prepare_env first

This commit is contained in:
James Laska 2015-08-11 10:46:56 -04:00 committed by Chris Meyers
parent 171d5abf33
commit d30605d82d

View File

@ -2,10 +2,14 @@
# All Rights Reserved.
import logging
from django.core.wsgi import get_wsgi_application
from awx import prepare_env
from awx import __version__ as tower_version
# Prepare the AWX environment.
from awx import prepare_env
prepare_env()
from django.core.wsgi import get_wsgi_application
"""
WSGI config for AWX project.
@ -15,9 +19,6 @@ For more information on this file, see
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
"""
# Prepare the AWX environment.
prepare_env()
logger = logging.getLogger('awx.main.models.jobs')
try:
fd = open("/var/lib/awx/.tower_version", "r")