1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

Fix import error by calling prepare_env first

This commit is contained in:
James Laska 2015-08-11 10:46:56 -04:00
parent 9aa89e08d9
commit f325b02c66

View File

@ -2,10 +2,14 @@
# All Rights Reserved. # All Rights Reserved.
import logging import logging
from django.core.wsgi import get_wsgi_application
from awx import prepare_env
from awx import __version__ as tower_version 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. 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/ https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
""" """
# Prepare the AWX environment.
prepare_env()
logger = logging.getLogger('awx.main.models.jobs') logger = logging.getLogger('awx.main.models.jobs')
try: try:
fd = open("/var/lib/awx/.tower_version", "r") fd = open("/var/lib/awx/.tower_version", "r")