小编Kin*_*ack的帖子

Heroku的女服务员发出错误

我正试图从Gunicorn切换到Heroku上的女服务员.在日志中,我不断收到Waitress的错误:

Error: Bad module 'cardisle'
Run Code Online (Sandbox Code Playgroud)

在我的procfile中,我有:

web: waitress-serve --port=$PORT cardisle.wsgi:application
Run Code Online (Sandbox Code Playgroud)

如果我删除.wsgi扩展名,我会收到一个不同的错误:

Error: Bad object name 'application'
Run Code Online (Sandbox Code Playgroud)

我已经尝试过changint对象名称,wsgifunc因为它在Waitress文档中,但没有运气.

任何帮助,将不胜感激.我有一个wsgi.py文件,其中包含以下内容:

import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cardisle.settings")
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
Run Code Online (Sandbox Code Playgroud)

django heroku procfile waitress

8
推荐指数
1
解决办法
3248
查看次数

标签 统计

django ×1

heroku ×1

procfile ×1

waitress ×1