简体   繁体   English

Heroku DEBUG = False ==> 500错误

[英]Heroku DEBUG = False ==> 500 Error

I have read all questions on this site and all other tutorials on the web and nothing is working for me, and I'm really thinking of just dropping heroku all together. 我已经阅读了该网站上的所有问题以及网络上的所有其他教程,但对我来说没有任何帮助,我真的在考虑将heroku放在一起。

here's my issue, when I set DEBUG to False, I get a 500 error, but I can still access my admin page, normally. 这是我的问题,当我将DEBUG设置为False时,出现500错误,但是我仍然可以正常访问我的管理页面。

my heroku settings is as follows 我的heroku设置如下

from base import * 
import dj_database_url

from os.path import abspath, basename, dirname, join, normpath
from sys import path
from memcacheify import memcacheify

CACHES = memcacheify()

# Allow all host headers


DATABASES['default'] =  dj_database_url.config()
SITE_ID = 3

DEBUG = False
ALLOWED_HOSTS = ["*"]

I have tried allowed hosts to be my-herokuapp.herokoapp.com and to be localhost, and localhost ip. 我试过允许主机为my-herokuapp.herokoapp.com并成为localhost和localhost ip。 I'm out of ideas and I have no idea why it's not working. 我没有主意,也不知道为什么它不起作用。

如果本地ALLOWED_HOSTS = ['localhost','127.0.0.1']否则ALLOWED_HOSTS = ['web.ru']

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 Heroku 和 Django 时 Debug=False 时出现 500 错误 - 500 error when Debug=False with Heroku and Django 当Debug = False时,在Heroku中出现500错误 - 500 error in Heroku, when Debug=False 部署到heroku更改DEBUG = False导致500错误 - Deploying to heroku changing DEBUG = False results in 500 error 每当django中debug = False时,Heroku会显示Server Error(500),而debug = True no error时 - Whenever debug=False in django, Heroku gives Server Error (500) and when debug=True no error 当 debug 设置为 False 时,在 Heroku 上部署 Django 时出现服务器错误 500 - Server error 500 on Django when deployed on Heroku when debug is set to False 尝试在 heroku 上使用 DEBUG=False 部署 django 应用程序时出现服务器错误 (500) - Server error (500) when trying to deploy django app with DEBUG=False on heroku Dango应用未正确部署在Heroku上:DEBUG = False时服务器错误500,DEBUG = True时未正确加载索引视图 - Dango app not deployed correctly on Heroku: Server Error 500 when DEBUG=False, not loading index view correctly when DEBUG=True 当生产中的debug = False时500服务器错误 - 500 server error when debug=False in production 当 DEBUG=False 时服务器错误 500 - Server Error 500 when DEBUG=False 当 DEBUG=False 时 django 服务器错误 (500) - django server error (500) when DEBUG=False
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM