mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 20:07:37 -02:30
Fix import error by calling prepare_env first
This commit is contained in:
committed by
Chris Meyers
parent
171d5abf33
commit
d30605d82d
11
awx/wsgi.py
11
awx/wsgi.py
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user