找不到Javascript文件/ERR_中止

找不到Javascript文件/ERR_中止,javascript,python,google-app-engine,Javascript,Python,Google App Engine,我正在创建一个与Trello API交互的javascript文件,但当我运行该文件时,Chrome开发工具中会这样说: 得到http://localhost:8080/js/trello.js net::ERR_中止 得到http://localhost:8080/js/trello.js 404找不到 trello.js肯定在/js中,我只尝试了/trello.js,但似乎没有任何效果。谁能帮助一个新手?我正在使用Google App Engine和Python和webapp2 HTML 在

我正在创建一个与Trello API交互的javascript文件,但当我运行该文件时,Chrome开发工具中会这样说:

得到http://localhost:8080/js/trello.js net::ERR_中止

得到http://localhost:8080/js/trello.js 404找不到

trello.js肯定在/js中,我只尝试了/trello.js,但似乎没有任何效果。谁能帮助一个新手?我正在使用Google App Engine和Python和webapp2

HTML


在app.yaml中需要一个静态url处理程序。尝试:

如果静态目录位于文件夹内,则需要foldername,其中文件夹与app.yaml处于同一级别。如果static与app.yaml处于同一级别,则为

- url: /static
  static_dir: static
然后,将/js目录放入静态目录中,并将路径更改为:

<script type="text/javascript" src="static/js/trello.js"></script>

我更喜欢将所有静态文件放在静态目录中。像static/js、static/img、static/font等。顶级解决方案都是通过一个静态url处理程序来处理的

一个快速猜测:Trello.js vs.Trello.js?不,不幸的是,我会编辑我的帖子说Trello.jsOk很容易:DIdk Google app engine,但我假设有一些公用文件夹?你的js文件夹应该在里面。如果没有公用文件夹或已经存在,我担心我们需要等待专家。你可能是对的,我会阅读。谢谢
- url: /static
  static_dir: foldername/static
- url: /static
  static_dir: static
<script type="text/javascript" src="static/js/trello.js"></script>
- url: /js
  static_dir: somefolder/static/js
  # or static_dir: static/js if inside static dir which is at same level as app.yaml
  # or static_dir: js  if js dir at same level as app.yaml