響應我建立與python-flask.In一個網站的網頁我裝一個javascript file.Here的我的文件結構:瓶:查看功能並沒有換來js文件
/python
/static
/plugins
/themes
/default
/js
/my-js.js
/templates
/my-file.html
/venv
app.py
我已經包含了我的 - js.js在my-file.html中。
還有其他腳本在這個js之前成功加載了頁面(與my-js.js在同一目錄中)。
當我打電話給我的文件與網址/static/themes/default/js/my-js.js
它說:ValueError: View function did not return a response
與回溯:
Traceback (most recent call last):
File "/Users/ozcan/Library/Python/2.7/lib/python/site-packages/flask/app.py", line 1701, in __call__
return self.wsgi_app(environ, start_response)
File "/Users/ozcan/Library/Python/2.7/lib/python/site-packages/flask/app.py", line 1689, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/Users/ozcan/Library/Python/2.7/lib/python/site-packages/flask/app.py", line 1687, in wsgi_app
response = self.full_dispatch_request()
File "/Users/ozcan/Library/Python/2.7/lib/python/site-packages/flask/app.py", line 1361, in full_dispatch_request
response = self.make_response(rv)
File "/Users/ozcan/Library/Python/2.7/lib/python/site-packages/flask/app.py", line 1439, in make_response
raise ValueError('View function did not return a response')
ValueError: View function did not return a response
爲什麼happennig?我沒有爲靜態文件寫這樣的路由,比如這些js。其他js文件是如何加載的,這個不是?