shenggf 5 gadi atpakaļ
vecāks
revīzija
e67ce14c8e
1 mainītis faili ar 6 papildinājumiem un 1 dzēšanām
  1. 6 1
      views.py

+ 6 - 1
views.py

@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-from flask import Flask
+from flask import Flask, jsonify
 
 app = Flask(__name__)
 
@@ -9,5 +9,10 @@ def index():
     return "this is my test project!测试自动部署7!测试成功^__^"
 
 
+@app.route("/test")
+def test():
+	return jsonify(msg=u'非跨域接口',status=1)
+
+
 if __name__ == "__main__":
     app.run()