我按照Heroku的教程操作,但我已经创建了一个相当复杂的Django应用程序,想要上传它。我将其复制到一个新文件夹中,并成功使用 git init
命令进行了初始化,还将文件添加到了提交中。然后我执行了 heroku create --stack cedar
命令,以便获取一个网站,接着执行了 git push heroku master
命令。但我得到了以下错误提示:
Counting objects: 6756, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5779/5779), done.
Writing objects: 100% (6756/6756), 6.98 MiB | 953 KiB/s, done.
Total 6756 (delta 2210), reused 0 (delta 0)
-----> Heroku receiving push
-----> Removing .DS_Store files
-----> Python app detected
! Django app must be in a package subdirectory
! Heroku push rejected, failed to compile Python app
To git@heroku.com:sitename.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:sitename.git'
在Heroku文件夹中,我有我的init、设置、管理和urls.py文件,然后我有文件夹OmniCloud_App,其中包含该特定应用程序的管理员、模型、Templates(文件夹)、静态(文件夹)、测试、urls和视图。为什么Heroku无法识别这个应用程序?