我在 python buildpack - watson 服务应用程序中有多个屏幕(即页面)。我正在尝试创建一个到另一个屏幕的简单超链接。 Bluemix 部署在 Designer-index.html 处启动应用程序。 appfile structure
我正在使用此源作为应用程序中的超链接: xxxxx-xxxxx.mybluemix.net/templates/vehicle-selector.html
目前我收到 404 - 在服务器上找不到请求的 URL。 我是否错过了上下文根的标记?
最佳答案
通常会渲染 templates
目录中的文件
@app.route('/vehicle')
def showVehicle():
return render_template('vehicle-selector.html')
静态文件位于static
目录中
关于javascript - 已部署的 bluemix 应用程序上超链接的上下文根,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39018385/