【发布时间】:2019-04-25 18:26:22
【问题描述】:
在运行烧瓶文件后,我试图通过标签中的 href 调用不同的 HTML 页面。但它给出了
没找到
在服务器上找不到请求的 URL。如果您手动输入了 URL,请检查您的拼写并重试。我哪里错了。
` index.html
<section>
<nav>
<ul>
<li><a href="index.html" class="button js-button" role="button">
<i class="fa fa-file" aria-hidden="true"></i> File </a></li>
<br><br>
<li><a href="imageupload.html" class="button js-button" role="button"><i class="fa fa-file-image-o" aria-hidden="true"></i> Image</a></li>
<br><br>
<li><a href="addtext.html" class="button js-button" role="button"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> Text </a></li>
</ul>
</nav>
` 应用程序.py
app = Flask(__name__)
app.secret_key = 'random string'
#app.config['UPLOAD_FOLDER'] = 'templates/'
APP_ROOT = os.path.dirname(os.path.abspath(__file__))
@app.route('/')
def home():
return render_template('index.html')
【问题讨论】: