Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- File "C:PathHomeController.py", line 26, in deleteTwee
- ts
- id = request.args.get['id']
- AttributeError: 'function' object has no attribute 'args'
- 127.0.0.1 - - [17/Jan/2018 12:00:05] "DELETE /api/deleteTweet?id=ABC HTTP/1.1" 500
- import json
- import Service
- from flask import Flask, render_template,jsonify,request
- app = Flask(__name__)
- apiUrl='/api'
- @app.route('/')
- def hello_world():
- return render_template("/home.html", code=400)
- @app.route(apiUrl+'/getData', methods=['GET'])
- def test_request():
- list = [15,21,8]
- return jsonify(list)
- @app.route(apiUrl+'/getTweets', methods=['GET'])
- def request():
- return Service.getAlltwits()
- @app.route(apiUrl+'/deleteTweet', methods=['DELETE'])
- def deleteTweets():
- id = request.args.get['id']
- print(id)
- return
Add Comment
Please, Sign In to add comment