@ -11,8 +11,7 @@ def drawPlz():
name = request . form . get ( ' lostobject ' )
name = request . form . get ( ' lostobject ' )
msg = " Sorry that you lost {name} . But {name} will be having fun somewhere. "
msg = " Sorry that you lost {name} . But {name} will be having fun somewhere. "
if request . method == ' POST ' :
if request . method == ' POST ' :
print ( " is this workhing? " )
image = request . form [ " data " ]
image = request
print ( image )
print ( image )
return render_template ( " drawing.html " , title = title , msg = msg )
return render_template ( " drawing.html " , title = title , msg = msg )
@ -28,7 +27,8 @@ def index():
# Read the values from the form element.
# Read the values from the form element.
name = request . form . get ( ' lostobject ' , ' nana ' )
name = request . form . get ( ' lostobject ' , ' nana ' )
text = request . form . get ( ' text ' , ' haha ' )
text = request . form . get ( ' text ' , ' haha ' )
print ( text )
# date = request.form['dd-mm-yyyy'] Q.How can I include date? Or maybe general date input? Sometimes ppl do remember when they lose sth. and somethimes they do not know.
# date = request.form['dd-mm-yyyy'] Q.How can I include date? Or maybe general date input? Sometimes ppl do remember when they lose sth. and somethimes they do not know.
# Write the submitted data to a file, which is
# Write the submitted data to a file, which is
@ -51,4 +51,4 @@ def index():
if __name__ == ' __main__ ' :
if __name__ == ' __main__ ' :
APP . debug = True
APP . debug = True
APP . run ( port = 5000 )
APP . run ( port = 5000 )