Created
September 12, 2013 10:48
-
-
Save zidarsk8/6535678 to your computer and use it in GitHub Desktop.
This file contains 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
zidar@haxor ~/programming/myproject | |
$ cat test.py | |
from flask import Flask | |
import flask | |
app = Flask(__name__) | |
@app.route('/') | |
def hello_world(): | |
return str(flask.app.request) | |
@app.route('/kpov-judge/<id>', methods=['GET', 'POST']) | |
def handle(id): | |
if flask.app.request.method == 'POST': | |
return "neki" | |
else: | |
return "aaa" | |
def handlePOST(): | |
return "post" | |
def handleGET(): | |
return "get" | |
if __name__ == '__main__': | |
app.debug = True | |
app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment