summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntanas Uršulis <antanas.ursulis@gmail.com>2013-07-03 00:28:10 +0100
committerAntanas Uršulis <antanas.ursulis@gmail.com>2013-07-03 00:28:10 +0100
commitbe0237f31708f567150b02b8afcbd7d00fa9262b (patch)
tree553ea8b2c6f3716016d5dccc11908bd2b2661c6d
parentInitial protobuf messages (diff)
downloadlog-analysis-be0237f31708f567150b02b8afcbd7d00fa9262b.tar.gz
log-analysis-be0237f31708f567150b02b8afcbd7d00fa9262b.tar.bz2
log-analysis-be0237f31708f567150b02b8afcbd7d00fa9262b.zip
Add simple submit POST method to flask app
-rw-r--r--flask_app.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/flask_app.py b/flask_app.py
index 1bfd837..a69f4f8 100644
--- a/flask_app.py
+++ b/flask_app.py
@@ -3,12 +3,24 @@ The web application built on Flask is contained within this file.
When run as a script, the Flask development server is started.
"""
-from flask import Flask
+import submission_pb2
+from flask import Flask, request
+
app = Flask(__name__)
@app.route('/')
def index():
pass
+@app.route('/submit', methods=['POST'])
+def submit():
+ """
+ TODO:
+ pass through all steps - input, analysis, storage
+ """
+ submission = submission_pb2.Submission()
+ submission.ParseFromString(request.data)
+ return str(submission)
+
if __name__ == '__main__':
app.run(host='::1', debug=True)