我关注了所有steps indicated in the heroku site每次我都会遇到相同的错误:
$ git push heroku master
Counting objects: 11, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (11/11), 4.12 KiB, done.
Total 11 (delta 0), reused 0 (delta 0)
! Push rejected, no Cedar-supported app detected
To <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="57303e23173f3225383c227934383a" rel="noreferrer noopener nofollow">[email protected]</a>:glacial-mountain-3911.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d3b4baa793bbb6a1bcb8a6fdb0bcbe" rel="noreferrer noopener nofollow">[email protected]</a>:glacial-mountain-3911.git'
我寻找了其他解决方案,其中一些有一点差异,但没有一个能够运行:(
这是我的项目的结构:
drwxr-xr-x 9 marcpou staff 306 28 jul 22:07 .
drwxr-xr-x 17 marcpou staff 578 28 jul 00:52 ..
drwxr-xr-x 13 marcpou staff 442 28 jul 22:09 .git
-rw-r--r-- 1 marcpou staff 24 28 jul 01:05 .gitignore
-rw-r--r-- 1 marcpou staff 32 28 jul 00:57 Procfile
drwxr-xr-x 10 marcpou staff 340 28 jul 00:58 hellodjango
-rw-r--r-- 1 marcpou staff 254 28 jul 00:56 manage.py
-rw-r--r-- 1 marcpou staff 154 28 jul 22:08 requeriments.txt
drwxr-xr-x 6 marcpou staff 204 28 jul 00:56 venv
以及requeriments.txt文件的内容
Django==1.5.1
distribute==0.6.34
dj-database-url==0.2.2
dj-static==0.0.5
django-toolbelt==0.0.1
gunicorn==17.5
psycopg2==2.5.1
static==0.4
wsgiref==0.1.2
这就是 Procfile 的内容
web: gunicorn hellodjango.wsgi
我发现我的项目中不存在文件“hellodjango.wsgi”。内容应该是什么?这些是我的项目的文件。
-rw-r--r-- 1 marcpou staff 0 28 jul 00:56 __init__.py
-rw-r--r-- 1 marcpou staff 155 28 jul 00:57 __init__.pyc
-rw-r--r-- 1 marcpou staff 5869 28 jul 01:02 settings.py
-rw-r--r-- 1 marcpou staff 2876 28 jul 00:58 settings.pyc
-rw-r--r-- 1 marcpou staff 571 28 jul 00:56 urls.py
-rw-r--r-- 1 marcpou staff 293 28 jul 00:58 urls.pyc
-rw-r--r-- 1 marcpou staff 1557 28 jul 01:04 wsgi.py
-rw-r--r-- 1 marcpou staff 1059 28 jul 00:57 wsgi.pyc
在heroku上测试Push过程,我创建了一个应用程序,但我没有编辑任何内容,这意味着我没有设置任何数据库连接。
有人有什么想法吗?我认为该错误是微不足道的,但我无法看到该错误。
提前致谢!
最佳答案
我非常确定纠正requirements.txt的拼写可以解决这个问题。然后解决下一个问题:添加 postgres 数据库并对其进行升级。
关于django - 推送Django项目时Heroku上出现 "Push rejected, no Cedar-supported app detected"如何解决?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17952746/