小编Kie*_*ood的帖子

即使使用 ALLOWED_HOSTS=["*"] 在 django 上使用 debug=False 也遇到 500 错误

我尝试使用的每个页面上都有 500 个错误。我唯一要更改的是 DEBUG 为 False。

这是我的配置:

SECRET_KEY = os.environ.get("SECRET_KEY", "0$ke!x1bz5cj0mpzo1zfx4omw-c9iqw%m95zb)(2@ddg5s+3!f")

ALLOWED_HOSTS = ['*']

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False


# Application definition

INSTALLED_APPS = [
    'posts', # Contains all dynamic and static pages related to posts
    'courses', # Contains all dynamic and static pages related to courses and modules
    'pages', # Contains all static pages that are not post related
    'markdownx', # Allows for editing and creating markdown content
    'jet.dashboard',
    'jet', …
Run Code Online (Sandbox Code Playgroud)

python django python-3.x

2
推荐指数
1
解决办法
3149
查看次数

标签 统计

django ×1

python ×1

python-3.x ×1