장고 1.6에서 1.7로 업그레이드하려고합니다.django 1.7로 마이그레이션하기 위해 wsgi 응용 프로그램을 구성하는 방법은 무엇입니까?
파이썬 manage.py의의 runserver를 실행하면, 다음과 같은 오류가있어:
WSGI_APPLICATION = 'myapp.wsgi.application'
가 여기 내 wsgi.py 파일입니다 :
django.core.exceptions.ImproperlyConfigured: WSGI application 'myapp.wsgi.application' could not be loaded; Error importing module: 'cannot import name get_path_info'
여기 내 settings.py의 해당 라인의
을import os
# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
# if running multiple sites in the same mod_wsgi process. To fix this, use
# mod_wsgi daemon mode with each site in its own daemon process, or use
# os.environ["DJANGO_SETTINGS_MODULE"] = "myapp.settings"
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myapp.settings")
# This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if the WSGI_APPLICATION
# setting points here.
from django.core.wsgi import get_wsgi_application
# Apply WSGI middleware here.
# from helloworld.wsgi import HelloWorldApplication
# application = HelloWorldApplication(application)
from dj_static import Cling
application = Cling(get_wsgi_application())
고쳐 주겠습니까?
'Cling'이 (가) 오류를 일으키는 것 같습니다. Cling을 제거하고 다시 시도 할 수 있습니까? – ChillarAnand
@ChillarAnand 이렇게하면 서버가 시작되지만 정적 파일은 더 이상 제공되지 않습니다. – egoz