標籤:spec ping 資料 restart exp 重寫 access locking uri
起因
本來想這用django 寫一個web 應用程式,便於管理mongodb的資料。結果django 不直接支援mongodb……又沒時間研究NoSQL。於是想著隨便整個api吧……
於是先用flask 做個簡單的demo 部署到本地試試水
簡單的demo
from flask import Flask, jsonifyapp = Flask(__name__)tasks = [ { ‘id‘: 1, ‘title‘: u‘Buy groceries‘, ‘description‘: u‘Milk, Cheese, Pizza, Fruit, Tylenol‘, ‘done‘: False }, { ‘id‘: 2, ‘title‘: u‘Learn Python‘, ‘description‘: u‘Need to find a good Python tutorial on the web‘, ‘done‘: False }]@app.route(‘/‘)def hello_world(): return jsonify({‘task‘:tasks})if __name__ == ‘__main__‘: app.run()
走進部署之坑
網上五花八門的部署blog……各種轉載…… http://python.jobbole.com/87655/ 借鑒一下吧
訪問掉坑
人家教程裡寫的好好的 “hello ……”
而我卻是這樣的
Config Error This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
是這樣的……
結果
This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
Add Application Development from the Features! Remember to add the 4.5 stuff if you need it
解決方案就是安裝一下asp.net……
終於看到了結果……
windows 10 部署flask web