应用程序与buildpack django heroku不兼容

wkyowqbh  于 2021-07-13  发布在  Java
关注(0)|答案(0)|浏览(184)

有人能给我小费吗?在这方面和django都很新。
我尝试在dev上使用以下步骤 django_heroku 在网上输入的 settings.py 文件。一小截 settings.py :

"""
Django settings for mysite project.

Generated by 'django-admin startproject' using Django 2.1.7.

For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""

import os
import django_heroku
django_heroku.settings(locals())

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
TEMPLATES_DIR = os.path.join(BASE_DIR, 'templates')

这是my requirements.txt:

Django==2.2.8
gunicorn
django-heroku
django-crispy-forms==1.8.1
django-summernote==0.8.11.4
pytz==2019.3
sqlparse==0.3.0

程序文件: web: gunicorn mysite.wsgi --log-file - 使用heroku管道,正如我在博客文章中提到的 git push heroku master :

Enumerating objects: 237, done.
Counting objects: 100% (237/237), done.
Delta compression using up to 8 threads
Compressing objects: 100% (137/137), done.
Writing objects: 100% (237/237), 67.80 KiB | 6.16 MiB/s, done.
Total 237 (delta 100), reused 216 (delta 92), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/python
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
remote:        More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to becomingme.
remote:
To https://git.heroku.com/becomingme.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/becomingme.git'

构建包是我试图研究的东西。如果通过heroku管理面板,将building pack设置为python仍然会得到相同的错误,这似乎无关紧要。非常感谢您的任何提示。。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题