【问题标题】:How to test custom 404 and 500 pages on development server with static files?如何使用静态文件在开发服务器上测试自定义 404 和 500 页面?
【发布时间】:2013-08-03 02:50:41
【问题描述】:

除了设置网络服务器和进行 collectstatic 之外,在部署到生产环境之前,有什么方法可以让我在开发环境中使用正确的静态文件查看 404 和 500 页面的确切外观?

请参阅我根据以下内容构建了自定义 404 和 500 页面: Customised Error Views Documentation

我在使用静态页面收集器的开发服务器上试用它: Staticfiles documentation

但是前者需要DEBUG关闭,后者需要DEBUG开启!?

【问题讨论】:

标签: django


【解决方案1】:

寻找,我会找到……抱歉。这没东西看。答案当然是在这里……

https://stackoverflow.com/a/7639983/75033

manage.py runserver --insecure

【讨论】:

    猜你喜欢
    • 2013-02-13
    • 1970-01-01
    • 2016-09-02
    • 1970-01-01
    • 1970-01-01
    • 2018-10-12
    • 1970-01-01
    • 2013-07-25
    • 1970-01-01
    相关资源
    最近更新 更多