Created
July 13, 2014 15:09
-
-
Save gu-fan/85acc933f126cfeb1f42 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 Flask, render_template, request | |
| # from flask.ext.socketio import SocketIO, emit | |
| import os | |
| import rstdoc | |
| app = Flask(__name__) | |
| app.config['SECRET_KEY'] = 'secret!' | |
| app.debug = True | |
| @app.route("/", methods=['GET','PUT','POST']) | |
| def index(): | |
| print request.method | |
| if request.method == 'PUT' or request.method == 'POST': | |
| print request.data | |
| print request.__dict__ | |
| return render_template('index.html') | |
| if __name__ == '__main__': | |
| app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment