Python 3.x GAE Python 3:静态文件不会加载到本地主机上,但在联机部署时会加载
我正在尝试将Google应用程序引擎标准Flask web应用程序从Python 2.7迁移到Python 3。它在部署到appspot时工作得很好,但在运行本地开发服务器时仍然遇到问题Python 3.x GAE Python 3:静态文件不会加载到本地主机上,但在联机部署时会加载,python-3.x,flask,localhost,google-app-engine-python,static-files,Python 3.x,Flask,Localhost,Google App Engine Python,Static Files,我正在尝试将Google应用程序引擎标准Flask web应用程序从Python 2.7迁移到Python 3。它在部署到appspot时工作得很好,但在运行本地开发服务器时仍然遇到问题 问题是,当在本地开发服务器上运行时,我的应用程序无法找到我的静态文件。我得到了这个错误Uncaught SyntaxError:Unexpected token'我发现了它。我需要将我的app_共享文件夹重命名为static。你可以在上面找到烧瓶文档 runtime: python38 instance_cla
问题是,当在本地开发服务器上运行时,我的应用程序无法找到我的静态文件。我得到了这个错误
Uncaught SyntaxError:Unexpected token'我发现了它。我需要将我的app_共享文件夹重命名为static。你可以在上面找到烧瓶文档
runtime: python38
instance_class: F4
automatic_scaling:
max_concurrent_requests: 30
handlers:
- url: /_ah/start
script: auto
- url: /app_shared/app_setup/app_style/*
static_dir: app_shared/app_setup/app_style
- url: /app_shared/app_setup/app_images/*
static_dir: app_shared/app_setup/app_images
- url: /app_shared/app_static/jquery/v_3_3_1/*
static_dir: app_shared/app_static/jquery/v_3_3_1
- url: /app_shared/app_static/util/*
static_dir: app_shared/app_static/util
- url: .*
script: auto
error_handlers:
- file: app_code/templates/errors/default.htm
- error_code: timeout
file: app_code/templates/errors/408_timeout.htm
<script src="/app_shared/app_static/jquery/v_3_3_1/jquery-3.3.1.min.js"></script>