我已经完成了 pip install Flask-debugtoolbar 但我仍然收到导入错误
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_debugtoolbar import DebugToolbarExtension
# Create application
app = Flask(__name__)
app.config.from_pyfile('config.py')
db = SQLAlchemy(app)
app.debug = True
toolbar = DebugToolbarExtension(app)
@app.route('/', methods=['GET', 'POST'])
def index():
return '<a href="/admin/">Click me to get to Home!</a>'
import views
import models
安装
pip installflask_debugtoolbar --upgrade
body
将 body
添加到您的 html 页面:
@app.route('/', methods=['GET', 'POST'])
def index():
return '<body><a href="/admin/">Click me to get to Home!</a></body>'
app.run()
我是一名优秀的程序员,十分优秀!