From 8607eedfa3c26e98bb00bc254d61a8cc1eba7d5a Mon Sep 17 00:00:00 2001 From: nathaniel smith Date: Sat, 1 Aug 2015 16:36:22 -0700 Subject: [PATCH] hmm --- tildetown-py/cgi.py | 7 +++++-- tildetown-py/templates/guestbook.html | 12 ++++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tildetown-py/cgi.py b/tildetown-py/cgi.py index d452082..85a677a 100644 --- a/tildetown-py/cgi.py +++ b/tildetown-py/cgi.py @@ -63,7 +63,11 @@ def get_guestbook(): @app.route('/guestbook', methods=['POST']) def post_guestbook(): - save_post(request.form['name'], request.form['message']) + message = request.form['message'][0:400] + name = request.form['name'][0:140] + captcha = request.form['hmm'] + print(captcha) + save_post(name, message) return redirect("/guestbook") @app.route('/helpdesk', methods=['GET']) @@ -73,7 +77,6 @@ def helpdesk(): if __name__ == '__main__': if len(argv) == 2: data_dir = argv[1] - else: data_dir = mkdtemp() diff --git a/tildetown-py/templates/guestbook.html b/tildetown-py/templates/guestbook.html index 511dc7d..975e317 100644 --- a/tildetown-py/templates/guestbook.html +++ b/tildetown-py/templates/guestbook.html @@ -11,14 +11,22 @@ name! message! + are you a robot!? - + - + + + + + + + +