shenggf 5 years ago
parent
commit
e67ce14c8e
1 changed files with 6 additions and 1 deletions
  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()