Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from flask import Flask
- from flask_restful import Resource, Api
- app = Flask(__name__)
- api = Api(app)
- todos = {}
- @app.route('/')
- def home():
- return 'this works'
- class TodoSimple(Resource):
- def get(self):
- return 'blah'
- # return {todo_id: todos[todo_id]}
- api.add_resource(TodoSimple, '/test') # Getting a 404 for this route on http://127.0.0.1:5000/test
- if __name__ == '__main__':
- app.run(debug=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement