Created
January 25, 2015 01:10
-
-
Save erfannoury/6e01881409e2bfbca3f5 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
| @application.route('/result', methods=['POST']) | |
| def signup(): | |
| print '--------- post method ---------------' | |
| # for item in request.form: | |
| # print request.form[item] | |
| print 'query: ', request.form["query"] | |
| # signup_data = dict() | |
| # for item in request.form: | |
| # signup_data[item] = request.form[item] | |
| # | |
| # exists = User.query.filter_by(email=signup_data["email"]).first() | |
| # if exists is None: | |
| # store_in_rdbms(signup_data) | |
| # # store_in_dynamo(signup_data) | |
| # publish_to_sns(signup_data) | |
| # else: | |
| # return Response("", status=409, mimetype='application/json') | |
| # | |
| # return Response(json.dumps(request.form), status=201, mimetype='application/json') | |
| theme = 'flatly' | |
| return flask.render_template('result.html', theme=theme, query=request.form["query"]) | |
| print '------------------------ post method ----------------------' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment