[英]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.