Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
这是app.py的代码,这个运行用的端口号是5500
from flask import Flask, render_template
from livereload import Server
app = Flask(__name__)
@app.route("/")
def index():
return render_template("index.html", title="
welcome to flask
", body="hello flask
")@app.template_filter("md")
def markdown_to_html(txt):
from markdown import markdown
return markdown(txt)
def read_md(filename):
with open(filename) as md_file:
content = reduce(lambda x, y: x+y, md_file.readlines())
return content.decode("utf-8")
@app.context_processor
def inject_me