From 5d8ef7954eb7bae8f81db86ff613799314fa4c36 Mon Sep 17 00:00:00 2001 From: zeroth Date: Thu, 4 Apr 2019 12:56:35 +0100 Subject: [PATCH] removing the form --- __pycache__/config.cpython-35.pyc | Bin 0 -> 419 bytes __pycache__/contextualise.cpython-35.pyc | Bin 0 -> 3023 bytes __pycache__/forms.cpython-35.pyc | Bin 0 -> 1040 bytes contextualise.py | 24 ++--------------------- templates/description.html | 14 ------------- templates/layout.html | 2 +- 6 files changed, 3 insertions(+), 37 deletions(-) create mode 100644 __pycache__/config.cpython-35.pyc create mode 100644 __pycache__/contextualise.cpython-35.pyc create mode 100644 __pycache__/forms.cpython-35.pyc diff --git a/__pycache__/config.cpython-35.pyc b/__pycache__/config.cpython-35.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8420f453f83911095798dd42cbd4d725f3be06ca GIT binary patch literal 419 zcmYLE%}&BV5T14sNQIk;XD>z$*cUK{q&E1I0HJu0m~60J+mdz{cUufx@l`zdN_+L> z!58qNvqf>T^X)f(-_9Pk+s^mr>wN+M@8~^`Si*5z!;WH&CEQiD!IH!0<_oKdPBN^=pFnc*!;pUPSGTd{@G z4aS$L6kL;-6_VgaZy+7KD){o;MC8m}Gf^b&g$T=>@j|(y@$lN81n%fIxV#$l18+F? zF)CG(@;C^EWXcVzZBG{~X+CU}l_4#wiaSI$Fw%ALFlS*=<^JE@vVGIgJlk%6ZtWE8 EABkaMApigX literal 0 HcmV?d00001 diff --git a/__pycache__/contextualise.cpython-35.pyc b/__pycache__/contextualise.cpython-35.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e34a2721bcc8d75b727d22fc3c473afcf63d733e GIT binary patch literal 3023 zcma(TO>-O94R5(zew&hPiI!zcG;P{q5_26%bz4VL(pYiROrvB>r=IL2!&&h?l1uFe z{dQ^DoMfgmZcn}E(o+vT^sn^TLl5uTUVQ5%J?K>6Eh#B&XWFF}3q0TfcmN)tTBTC_ z!$1D`)n6+Be}fB89`O(GjZX~#j(-e%fP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0#U%!AouThaUcF?xEI#9`2ku_`lstEnjeN*Vaq> z_36Ten$Sfo?_dqIGSbG6yied=T1bmjzKyub`q2qCzC6x=_{2+wGD~7qMA%vG5&myQ zS-N24m&lK=B7jUWv&?GvW?0Us80oi|kvqs!`EECGy|CL=SuTzygQusc0fAHTqXBA|O&zB|bLhBxlJq4tM`sB!95iwJe1OOjF>*78q=q5! ze?yR$2vi9y5LhIzguuya74kCT%EAodM3GmBFzMPWBZ`$t6Gbl5mK6duV&m~bHxPKd zj5{7%F1DCkB{HyH%E~ds(gRq`+CS(=oDsGnGt@J>3gA| zth*d{QTtL^iLG4d#xAMf>JF1;E+Z%5g#yr}a7&+gH;DMe7yHz5;zI;GY(f9hZ<&?Z t3R}pm(^}DD^WPG)3@fw2Dn^|xvkI%3Rs7bB71qdF#+r%0!rEGy{R_hT*S7!w literal 0 HcmV?d00001 diff --git a/__pycache__/forms.cpython-35.pyc b/__pycache__/forms.cpython-35.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dd189744f8aa0f8bf0689d5abb8c29674e08b83b GIT binary patch literal 1040 zcmZWo&2G~`5T14HI6qF)UMNxl`G#_7E}SX^1)7#}NUOLY#X_=-cheZWal7jP^|ibJ z7v6vaue4WA9C(3VV8(9LBCL4w&3rSnGoS6vUa#}#_xHEoEP$VI>#`B=;;job9DfWl z0LdU^z{s~Cvp_Z=Y=E>Ov_U!$Iv|@6HbJ@&x*%H+wm`NaY}Yl7s-^>B2V@t*F0cb` z19#vHHgrHRxWtAY@FoNU_ZOZF17_^~T*-lJ+9%?3v7d^J8}D#Yh*P0zuSdi)CF0uc z2FrIcz0T}RVxHzJLS!PjCb~hP(#2`T3@p?67-uPui(F~be^cW$UyPK>RYHTTt|o$A zy!BT!0!R;(BeXy?NF-sydxzAyWN?c6SR@BgjTL1RMQJYJ@|1?jnAQT(CKYgb-Uq&3 z#Ti4bL>G8>RqoyD?1AV3?@=UN1HOi;Z5VGNmO6fy36iaJ#<3JT<>qlFVl8}ux+(u6 zUn+lr#CF*n$vDk+O8@@^L5v@Bu7uXxsZ=bupU?a~frasfP*07U%=0u6 z+OVlAH}H0y;_ zn;bXEQKUto=t-NVu3n}epzfhtnXBi+c`n7U6nQZp?&Zl+V!9q4PmW%VPJ-d_>)_?# z_#k+3G#R0{)N_2#f+R;7hckR8di(4`dDx8(&@`jRw%9{<7i|?E4|=9O%VPZ@`c%vm zewsKHBC4$yvoWL`GSs75LbV9d2G!cCONdUn8N5dKF=kqiYu%nO^fWbDXOFBq)?X$8 B28I9t literal 0 HcmV?d00001 diff --git a/contextualise.py b/contextualise.py index 6091f79..9fbd14a 100644 --- a/contextualise.py +++ b/contextualise.py @@ -73,9 +73,8 @@ def all(): return render_template('all.html', file=thefile, listingfiles=listingfiles, jsonfiles=jsonfiles, listofdicts=listofdicts, counter2=counter2) -@app.route('/description', methods=['GET', 'POST']) +@app.route('/description') def description(): - form = ReusableForm(request.form) #pick a file but that will be done an other way later thefile = listingfiles[positioninarray] #select one file from fullpath minus static/ @@ -96,29 +95,10 @@ def description(): Your browser does not support the video tag. ''') - print (form.errors) - if request.method == 'POST' and form.validate(): - return 'Success!' # return render_template('description.html', form=form, file=thefile, listingdirectories=listingdirectories, listingfiles=listingfiles) - return render_template('description.html', form=form, file=thefile) + return render_template('description.html', file=thefile) -@app.route('/get-data', methods=['GET', 'POST']) -def savepost(): - if request.method=='POST': - dict={'id':listingdirectories[positioninarray][13:],'name':request.form['name'],'email':request.form['email'],'friend':request.form['friend'],'content':request.form['content']} - # open with "a" if the file should concatenate content - - #json file naming gone unique by adding time and date of submission - - with open(listingdirectories[positioninarray]+"/"+now+"_data_file.json", "w") as write_file: - json.dump(dict, write_file) - return "The JSON file is ready." - #throw description and next item, wee need to iterate through the files - - else: - return "Error" - if __name__ == '__main__': app.run(debug=True) diff --git a/templates/description.html b/templates/description.html index bb2fbfa..2aa13f1 100644 --- a/templates/description.html +++ b/templates/description.html @@ -17,19 +17,5 @@ {% endfor %} --> - {% for message in form.name.errors %} -
{{ message }}
- {% endfor %} - -
-
- {{ form.hidden_tag() }} -
{{ form.name.label }} {{ form.name }}
-
{{ form.email.label }} {{ form.email }}
-
{{ form.friend.label }} {{ form.friend }}
-
{{ form.content.label }} {{ form.content }}
-
{{ form.submit }}
-
-
{% endblock %} diff --git a/templates/layout.html b/templates/layout.html index 8caf8e6..9a1bb06 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -13,7 +13,7 @@