나는 다른 사람들이이 문제를 언급하는 것을 보았을 때 왜 이런 일이 계속 일어나는지를 조사하려고 시도했습니다.django 개발 서버를 실행하면 텍스트 편집기에서 manage.py가 열림
명령 줄에서 manage.py runserver
을 실행할 때마다 메모장의 프로젝트 디렉토리에서 manage.py 파일을 열면됩니다. 명령의 시작 부분에 파이썬을 포함하면 그 내용은 다음과 같습니다. 'python' is not recognized as an internal or external command, operable program or batch file.
지금 Windows를 사용하고 있습니다. 전에 리눅스를 돌리고 있었는데 잘 작동했습니다 ... 저는 방금 작업 한 모든 파일을 Windows로 옮겼습니다.이 문제가 발생하기 시작했습니다.
, 나는이의 runserver 명령을 manage.py 파일이 메모장에서 열립니다이다 실행할 때 발생하는 유일한 일을 반복하고 다음과 같은 포함#!/usr/bin/env python
from django.core.management import execute_manager
import imp
try:
imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__)
sys.exit(1)
import settings
if __name__ == "__main__":
execute_manager(settings)
당신에게 수 그냥 "파이썬"을 실행하고 인터프리터 쉘을 열 것인가? –
"명령 줄"은 무엇입니까? Windows? 맥 OS? 리눅스? 아주 구체적으로하십시오. 실제 세션의 실제 로그를 포함하십시오. 귀하의 질문에 ** 필요한 사실을 ** 업데이트하십시오. –
@ S.Lott : 좋아요, 업데이트했습니다. –