Django 1.8 python:无法打开文件“manage.py”:[Errno 2]没有这样的文件或目录

Wut*_*Wut 4 python django

我位于项目的外部目录中。当我尝试时python manage.py runserver,它有效,但如果我尝试部署我的代码并执行heroku run python manage.py migrate,它会显示以下错误 -

(cenv) C:\Users\Machine\cenv\myproject>heroku run python manage.py migrate
 Running `python manage.py migrate` attached to terminal... up, run.6848
 python: can't open file 'manage.py': [Errno 2] No such file or directory
Run Code Online (Sandbox Code Playgroud)

但是当我输入时DIR它显示它manage.py位于同一目录中。

   <DIR>          .
   <DIR>          ..
           59 .gitignore
   <DIR>          2015
   <DIR>          feature
          254 manage.py
   <DIR>          media
   <DIR>          myproject
           43 Procfile
          355 requirements.txt
           12 runtime.txt
          723 bytes
          12,963,143,680 bytes free


    (cenv) C:\Users\Machine\cenv\myproject>heroku run ls -al
    Running `ls` attached to terminal... failed
    !    App not found

    (cenv) C:\Users\Machine\cenv\myproject>heroku run pwd
    Running `pwd` attached to terminal... up, run.3539
    /app
Run Code Online (Sandbox Code Playgroud)

小智 5

切换到上面的目录myproject并调用heroku run python myproject/manage.py migrate.