hmm
parent
d93cf586a1
commit
8607eedfa3
|
@ -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()
|
||||
|
||||
|
|
|
@ -11,14 +11,22 @@
|
|||
<tr>
|
||||
<th>name!</th>
|
||||
<th>message!</th>
|
||||
<th>are you a robot!?</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" name="name" />
|
||||
<input type="text" name="name" maxlength="140" />
|
||||
</td>
|
||||
<td>
|
||||
<textarea style="border:0px"name="message" cols="100" rows="10"></textarea>
|
||||
<textarea maxlength="400" style="border:0px"name="message" cols="100" rows="10"></textarea>
|
||||
</td>
|
||||
<td>
|
||||
<radiogroup>
|
||||
<radio name="hmm"label="yeah" accesskey="Y" selected="true" value="yeah"/>
|
||||
<radio name="hmm" label="nope" accesskey="N" value="nope" />
|
||||
</radiogroup>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input style="font-size:200%" type="submit" value="sign"/>
|
||||
</form>
|
||||
|
|
Reference in New Issue