【发布时间】:2020-05-30 15:58:51
【问题描述】:
我已在我的根模板目录中放置了一个自定义 404.html 页面,但每当请求无效 URL 时,都会给出默认错误页面。奇怪的是,在生产中,显示“内部服务器错误”,而“未找到。 在此服务器上未找到请求的资源。”显示在 localhost 上。
Debug 在这两种情况下都设置为 false。
app/templates/app/404.html:
{% extends "app/base.html" %}
{% block page_header %}
<h1>404</h1>
<h2>The page you requested is not available.</h2>
<i class="far fa-meh"></i>
{% endblock page_header %}
【问题讨论】: