python - Heroku 和 Django : No default language could be detected for this app

标签 python django heroku python-3.6

我已按照教程 ( Link here ) 中给出的说明进行操作。我什至已经将runtime.txt 文件包含在正确版本的Python 中。我到处搜索但似乎没有解决方案有效。我的GitHub项目链接供引用:

https://github.com/MithilRocks/chakri

错误信息:

PS C:\Users\Mithil Bhoras\Documents\GitHub\chakri\chakri> git push heroku master
Counting objects: 90, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (80/80), done.
Writing objects: 100% (90/90), 8.78 MiB | 234.00 KiB/s, done.
Total 90 (delta 26), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote:  !     No default language could be detected for this app.
remote:                         HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
remote:                         See https://devcenter.heroku.com/articles/buildpacks
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to chakrilevels.
remote:
To https://git.heroku.com/chakrilevels.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/chakrilevels.git'

最佳答案

对于 future 的读者,与 @hansTheFranz 的评论相同的解决方案,但来自命令行:

  • 创建应用程序时:heroku create --buildpack heroku/python app_name

  • 对于现有应用:heroku buildpacks:set heroku/python

还有,官方Heroku Buildpack: Python文档可以提供帮助。

关于python - Heroku 和 Django : No default language could be detected for this app,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50763962/

相关文章:

css - 使用 django 在 heroku 上部署 Bootstrap

python - 通过 django 的 render() 快捷方式传递 GET 参数

python - 改进查询集中对象之间距离的计算

Python显示.ply、.STL、.igs、.step图像

python - 删除字典、列表、元组中的循环引用

python - 在 Django views.py 中转换缩略图后如何将缩略图保存到 default_storage(AWS S3)?

node.js - 将 nodejs/mongoose 部署到 heroku

javascript - 我在 Safari 5.1.7 中收到错误 "SyntaxError: Expected token ' )' "

python - args 的语义传递给 python threading.Thread __init__

python - 类中的方法可以是生成器吗?