Skip to content

Instantly share code, notes, and snippets.

@zidarsk8
Created September 12, 2013 10:48
Show Gist options
  • Save zidarsk8/6535678 to your computer and use it in GitHub Desktop.
Save zidarsk8/6535678 to your computer and use it in GitHub Desktop.
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