0
简单的问题,我希望... 我在开发时收到500内部错误,并希望将它们闪烁到浏览器屏幕,以便于更换时间。用Flask和Python做这个最简单的方法是什么? 谢谢。闪烁的500内部服务器错误屏幕烧瓶与Python
简单的问题,我希望... 我在开发时收到500内部错误,并希望将它们闪烁到浏览器屏幕,以便于更换时间。用Flask和Python做这个最简单的方法是什么? 谢谢。闪烁的500内部服务器错误屏幕烧瓶与Python
写custome错误页面,在烧瓶神社模板,显示要闪烁屏幕上的方式
from flask import render_template
@app.errorhandler(500)
def page_not_found(e):
return render_template('500.html'), 404
#An example template might be this for your 5000.html, you can write
#your own through this code:
{% extends "layout.html" %}
{% block title %}Page Not Found{% endblock %}
{% block body %}
<h1>Page Not Found</h1>
<p>What you were looking for is just not there.
<p><a href="{{ url_for('index') }}">go somewhere nice</a>
{% endblock %}
500,这意味着有你demo.may一些错误,以及把你的错误信息
真棒!不知道最简单的方法是什么,但这可能会奏效,谢谢! – douglasrcjames