opensshift에서 Django 1.7 응용 프로그램을 배포하고 싶습니다. 내가 Deploying a local django app using openshift 에 주어진 단계를 시도했다하지만 난 어떤 서버가이 요청을 처리하는 데 사용할 수 없습니다Django 1.7의 부트 스트랩 OpenShift에서 배포 할 응용 프로그램
503 서비스를 사용할 수 없음 을 얻고있다.
오류 메시지.
누구나 opensshift에서 Django 1.7 응용 프로그램을 배포하는 올바른 방법을 알려주시겠습니까? (Openshift 만든)
wsgi.py 코드
`
import os
virtenv = os.environ['OPENSHIFT_PYTHON_DIR'] + '/virtenv/'
virtualenv = os.path.join(virtenv, 'bin/activate_this.py')
try:
execfile(virtualenv, dict(__file__=virtualenv))
except IOError:
pass
#
#
# IMPORTANT: Put any additional includes below this line. If placed above this
# line, it's possible required libraries won't be in your searchable path
#
from social.wsgi import application
` 디렉토리 구조가
.
|-- coleccioneselcomercio
| |-- static
| `-- templates
|-- manage.py
|-- network
| |-- admin.py
| |-- __init__.py
| |-- models.py
| |-- static
| | `-- network
| | `-- favicon.ico
| |-- templates
| | `-- network
| | |-- index.html
| | |-- Login.html
| | `-- Signup.html
| |-- tests.py
| `-- views.py
|-- requirements.txt
|-- setup.py
|-- social
| |-- app_Global.py
| |-- __init__.py
| |-- settings.py
| |-- urls.py
| `-- wsgi.py
|-- wsgi
| `-- static
`-- wsgi.py
사회/wsgi.py입니다 기본 WSGI되어 다음과 같은 포함 .py 만든 django-admin
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "social.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
내가 물어보고 싶은 또 다른 사항은 opensshift에 의해 만들어진 wsgi.py에서이 코드가 무엇이고 wsgi.py에 보관되어야하는지 아니면 주석 처리해야하는지 여부입니다.
if __name__ == '__main__':
from wsgiref.simple_server import make_server
httpd = make_server('localhost', 8051, application)
# Wait for a single request, serve it and quit.
httpd.handle_request()
도움이 필요한 소스 코드를 게시해야 할 수도 있습니다! –
게시물을 편집했습니다. 도와 주실 래요? 다른 코드를 게시해야하는지 알려주세요. – girish946