Created
June 29, 2011 22:32
-
-
Save colwilson/1055179 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Blueprint, render_template, request, current_app, jsonify, session | |
from flask.views import MethodView, View | |
blueprint = Blueprint('www', __name__) | |
class MyView(MethodView): | |
def get(self): | |
return request.method | |
def put(self): | |
return request.method | |
def post(self): | |
return request.method | |
def delete(self): | |
return request.method | |
blueprint.add_url_rule('/api/counter', view_func=MyView.as_view('MyView')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment