From bab091922a199623246d471cd05684f80cf924ec Mon Sep 17 00:00:00 2001 From: Milan Matousek Date: Tue, 18 Jun 2019 13:45:49 +0200 Subject: [PATCH 1/6] Padesatkrat a stale poprve.. --- main/server.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 main/server.py diff --git a/main/server.py b/main/server.py new file mode 100644 index 0000000..9889c47 --- /dev/null +++ b/main/server.py @@ -0,0 +1,23 @@ +import cherrypy + +#from modules import index +#from modules import select +#from modules import delete +#from modules import insert +#from modules import create +#from modules import drop +from modules import * + + +class main_server_loop(object): + server_config = { + 'server_socket_host': '127.0.0.1', + 'server_socket_port': 80 + } + cherrypy.config.update(server_config) + @cherrypy.expose + def index(self): + return "Hello World!" + + +cherrypy.quickstart(main_server_loop()) \ No newline at end of file From 27ba0659564d8278ff4ec9d573afdfe5a4dbef90 Mon Sep 17 00:00:00 2001 From: Milan Matousek Date: Tue, 18 Jun 2019 15:56:27 +0200 Subject: [PATCH 2/6] add templates and modules + connect to load pages using url (/section/)..TODO: comments and PEP8 --- main/server.py | 52 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/main/server.py b/main/server.py index 9889c47..518eddd 100644 --- a/main/server.py +++ b/main/server.py @@ -1,23 +1,43 @@ +#Comments and PEP8 format TODO import cherrypy +import os -#from modules import index -#from modules import select -#from modules import delete -#from modules import insert -#from modules import create -#from modules import drop -from modules import * +from modules import select +from modules import delete +from modules import insert +from modules import create +from modules import drop +from modules import index + +SCRIPT_PATH = os.path.abspath(os.path.dirname(__file__)) class main_server_loop(object): - server_config = { - 'server_socket_host': '127.0.0.1', - 'server_socket_port': 80 - } - cherrypy.config.update(server_config) - @cherrypy.expose - def index(self): - return "Hello World!" + cherrypy.config.update({'server.socket_host': '127.0.0.1', + 'server.socket_port': 80, + }) + conf = { + '/': { + 'tools.sessions.on': True, + 'tools.staticdir.root': os.path.abspath(SCRIPT_PATH + '/') + }, + '/static': { + 'tools.staticdir.on': True, + 'tools.staticdir.dir': './static' + } + } + + cherrypy.tree.mount(index.wellcome(), "/", conf) + cherrypy.tree.mount(select.select(), "/select", conf) + cherrypy.tree.mount(delete.delete(), "/delete", conf) + cherrypy.tree.mount(insert.insert(), "/insert", conf) + cherrypy.tree.mount(create.create(), "/create", conf) + cherrypy.tree.mount(drop.drop(), "/drop", conf) + cherrypy.engine.start() -cherrypy.quickstart(main_server_loop()) \ No newline at end of file +if __name__ == '__main__': + try: + main_server_loop() + except Exception as e: + raise e \ No newline at end of file From 9c9c5dd437e2aa1bd114bab31426cce7b4b8a584 Mon Sep 17 00:00:00 2001 From: Milan Matousek Date: Tue, 18 Jun 2019 15:57:13 +0200 Subject: [PATCH 3/6] add templates and modules + connect to load pages using url (/section/)..TODO: comments and PEP8 --- main/modules/__pycache__/create.cpython-37.pyc | Bin 0 -> 606 bytes main/modules/__pycache__/delete.cpython-37.pyc | Bin 0 -> 606 bytes main/modules/__pycache__/drop.cpython-37.pyc | Bin 0 -> 596 bytes main/modules/__pycache__/index.cpython-37.pyc | Bin 0 -> 618 bytes main/modules/__pycache__/insert.cpython-37.pyc | Bin 0 -> 606 bytes main/modules/__pycache__/select.cpython-37.pyc | Bin 0 -> 606 bytes main/modules/create.py | 10 ++++++++++ main/modules/delete.py | 10 ++++++++++ main/modules/drop.py | 10 ++++++++++ main/modules/index.py | 10 ++++++++++ main/modules/insert.py | 10 ++++++++++ main/modules/select.py | 10 ++++++++++ main/templates/create.html | 8 ++++++++ main/templates/delete.html | 8 ++++++++ main/templates/drop.html | 8 ++++++++ main/templates/index.html | 8 ++++++++ main/templates/insert.html | 8 ++++++++ main/templates/select.html | 8 ++++++++ 18 files changed, 108 insertions(+) create mode 100644 main/modules/__pycache__/create.cpython-37.pyc create mode 100644 main/modules/__pycache__/delete.cpython-37.pyc create mode 100644 main/modules/__pycache__/drop.cpython-37.pyc create mode 100644 main/modules/__pycache__/index.cpython-37.pyc create mode 100644 main/modules/__pycache__/insert.cpython-37.pyc create mode 100644 main/modules/__pycache__/select.cpython-37.pyc create mode 100644 main/modules/create.py create mode 100644 main/modules/delete.py create mode 100644 main/modules/drop.py create mode 100644 main/modules/index.py create mode 100644 main/modules/insert.py create mode 100644 main/modules/select.py create mode 100644 main/templates/create.html create mode 100644 main/templates/delete.html create mode 100644 main/templates/drop.html create mode 100644 main/templates/index.html create mode 100644 main/templates/insert.html create mode 100644 main/templates/select.html diff --git a/main/modules/__pycache__/create.cpython-37.pyc b/main/modules/__pycache__/create.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..98875cf05fcb05334185af923fb152070609e19c GIT binary patch literal 606 zcmYjO&2AGh5FXo`Wr>m;D)oYRfn2&TfKXMCxJ3dEMJpl8T~F8z-k;iz)KtkSy`ieF z07qWQS58Pg0jG|$Ep(*$JpP$)z8RlQr(+=d_9y%Ni`MA>ETQO>+`S~wpqYUJ-ht*? z+<+Fy_M+gLeS~@Pn_j@8jQD7Rf>Uz$f&igl8VZhLm1w5<4eVJl(jw-Dw6v%^mW&=o zi*=uqzae)g1fFW|+1+f%w(L9m0Xu$9dfvka_yk+N;!%-KZuw4ZBjadseeAL64UxKh zAU~;mV~Xjpkwl60^nnI#AfVz^3clRdNEH)uxwR>QiidV0}sU$DKFQ`JltfD z#Y2i$edo~5i1Hxz2~6Wz97mkJi$TVQ@d$fFyO4GlD=hut>`7ki*~a9My&43(j=wlC Fh8nu5I&N!sv5S309}fXUA#mu5ClOIAe(`-Lka-}!J6kt4)qg~2I9b;oVDmH zG-F?hYo`Kzf=)eJNt*-i)A7jr?z_|JcsvBM_rJ5xKj|C&pCuHXkh^yT8Zs?bhoDRD5=D&uF7jw zHF@3YmHDr;TZh4(dl0A32!IdS0h_S<(bFjV>)A9V!Lm^`N*RVy_B<4iq`X}z^K_Fv zHxDV^b*)1?AwxQ@7c7lVxT>k;;VP9bf-EOGAlxfgYDW*dt`cGL?vj(@Rd G5Pt!0)R!{= literal 0 HcmV?d00001 diff --git a/main/modules/__pycache__/drop.cpython-37.pyc b/main/modules/__pycache__/drop.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1a913b78f3e5ec88f66e1e3e9600f0c318dec81c GIT binary patch literal 596 zcmYjO&2AGh5cbbzSwfRTd#m~axpZFup$L$;MS>ovR;nyFp0FFdKeZjHsghHAMSTT& z?1}d=M@~pQ0VifQMCwTM?Rf0@=9}5KqtTF|{rHnz{lxDtIvgy)V2bX~5DYWivVwhJ zMi_a|j0C=ug)sbrO_JaEg3acH2a^~~(fug`u!0*_2$0Lfa3k*7ju!(XsWv9YwcVWK zGcxM>68#;zKSv1IdB-2dTfX7n`6Jtk}j`@}BUMl1#CG08Wvl^fz4%p&Vk*hLhJ zGQOx91Gj1sQwM%!!xM8y$o6-dmu(GsU0L1a@4$ottn5K!w~m9Jc|db#2uuw5F(320VLwEFIh&*?RyDc?rQ%SjJqN}|O5Loq{eP1k z8pjlFyVipnBVjM}8H^}LtDv2G3NpT5jdaI&ifMbjgn8(5&+2GiN5wIFy%+F?{@$KJ F{sWBhllA}r literal 0 HcmV?d00001 diff --git a/main/modules/__pycache__/index.cpython-37.pyc b/main/modules/__pycache__/index.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..049e39d0545a5408b15980f0dbc950a244dbc52a GIT binary patch literal 618 zcmYjOyROtQ5cMM)!it*$Q6U=2G@Bnl=<<;0R^lN*mXKxQS(3$hT-yM^(KrUD=(l_3K$Yc#lH{H8}hom2% z3yH;pkgj^$DvzQQ2WBPMsutHKez^*%1veW1mDmhv|2!yb{HL;QjOxnA;NJUwD61N* z-3%M)&P?M$VvAQpQ?{z<%C^^|`7e0bgxN$ri?0wV37gZKG^ZE&@x>NX!Lmq0CS|8u zkTT4rJP=`gL&~#JnSVFgae7GMeCQq6xco`&6^L(Q8A9BGi$O-Gyx=y+ETsM0HB^2& VyV4gG+SnYjdj|pc<30}z{4a<5n%e*X literal 0 HcmV?d00001 diff --git a/main/modules/__pycache__/insert.cpython-37.pyc b/main/modules/__pycache__/insert.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9645888a52d8a24d805198ef9307be605191587c GIT binary patch literal 606 zcmYjO&2AGh5FXo`?Ghz9RN_+c0=aZw0HLZNaf<{!fL215yPmKcyg#)asi~4vdPTfK zd*qdT<%Gl&aOybQLPwf!$79bo-^`v*r(+;1|72f&(Kq@(ODH-ccdrOEXl9^*_n^5J zx1a^Gy(qY57cftL(+gOX5uZ#@a7OM<2oMUUq2MT1iDsJL!k!f)En;m*>(-(5C8LMY zV&50!Z^_*$fv4Vk_G7kVTXx6pVaGp_o)7R5KEsx;cvPg5?|dh=k#V%RdFip~jq>R7 zf&8@cjVY$XK{{_$t1Kt(IS;AywKo_tS)tN(`*kit()HMe#8M)p%g#2+lhVYYSq8qW z!cpC7yq3$5T6AmUe}bJ5+u!rN>Ke?O+Nd^vhwhv2`n;^r+D*Ta?#k32C6##9*LkDr zHg7t;Hve_@n=m?XkK*(h0q`+9W;1p(c^u_%y_lyYShlJ`DZ^OGfrsLWlvitI9&fUz z<{`!FzN1CYi1Hxz8BAj?t|RW=#UNwDdW1cuQ%JkZ6_);xdsY``wy`*5uLl8d;$IvX F!~@n-m>d8A literal 0 HcmV?d00001 diff --git a/main/modules/__pycache__/select.cpython-37.pyc b/main/modules/__pycache__/select.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..41f769c983e107197a47df9d6e140e65cc31cee3 GIT binary patch literal 606 zcmYjO&2AGh5FXo`Wr>;`kdP4K1#;=W076wk;ueW=09itoi6`s^?@w(`y7axAon()suip~iB894)nS&;A=3^(Ei zj6il2k{k9G7TGU)0n1hLcP1z}BlxG}5F|4oIf_kYnBg~YWO8Ce%8j{4i>t6=^e|bf z`;hRG;7`c~s(oZ%=LfcD-`ICJ@OPx=4P3x`*z*lficI!}AH+T}PL|h?12(ciO3-~>Ho9)h zrZZdnUuVCIlYx7ZexEpjPuU|jXV)jUUm32Ki#!%ewYov2;#8@ThvE~ZF1Om=-V}Gm zV~$sS=h3Bs4`T1R)b61jsrNqhrC?)wgqzbY=H15)&1g8gmzVUplpKraqktD_iX(&g E3l;K}I{*Lx literal 0 HcmV?d00001 diff --git a/main/modules/create.py b/main/modules/create.py new file mode 100644 index 0000000..5c79148 --- /dev/null +++ b/main/modules/create.py @@ -0,0 +1,10 @@ +import cherrypy + + +class create(object): + @cherrypy.expose + def index(self): + with open('templates/create.html') as fh: + index_f = fh.read() + result = index_f.format(_title='create_strana', _heading='create') + return result \ No newline at end of file diff --git a/main/modules/delete.py b/main/modules/delete.py new file mode 100644 index 0000000..16f0e52 --- /dev/null +++ b/main/modules/delete.py @@ -0,0 +1,10 @@ +import cherrypy + + +class delete(object): + @cherrypy.expose + def index(self): + with open('templates/delete.html') as fh: + index_f = fh.read() + result = index_f.format(_title='delete_strana', _heading='delete') + return result \ No newline at end of file diff --git a/main/modules/drop.py b/main/modules/drop.py new file mode 100644 index 0000000..0ea9e50 --- /dev/null +++ b/main/modules/drop.py @@ -0,0 +1,10 @@ +import cherrypy + + +class drop(object): + @cherrypy.expose + def index(self): + with open('templates/drop.html') as fh: + index_f = fh.read() + result = index_f.format(_title='drop_strana', _heading='drop') + return result \ No newline at end of file diff --git a/main/modules/index.py b/main/modules/index.py new file mode 100644 index 0000000..5f86243 --- /dev/null +++ b/main/modules/index.py @@ -0,0 +1,10 @@ +import cherrypy + + +class wellcome(object): + @cherrypy.expose + def index(self): + with open('templates/index.html') as fh: + index_f = fh.read() + result = index_f.format(_title='Titulni_strana', _heading='Vítejte!') + return result \ No newline at end of file diff --git a/main/modules/insert.py b/main/modules/insert.py new file mode 100644 index 0000000..d8cf708 --- /dev/null +++ b/main/modules/insert.py @@ -0,0 +1,10 @@ +import cherrypy + + +class insert(object): + @cherrypy.expose + def index(self): + with open('templates/insert.html') as fh: + index_f = fh.read() + result = index_f.format(_title='insert_strana', _heading='insert') + return result \ No newline at end of file diff --git a/main/modules/select.py b/main/modules/select.py new file mode 100644 index 0000000..be0e519 --- /dev/null +++ b/main/modules/select.py @@ -0,0 +1,10 @@ +import cherrypy + + +class select(object): + @cherrypy.expose + def index(self): + with open('templates/select.html') as fh: + index_f = fh.read() + result = index_f.format(_title='select_strana', _heading='select') + return result \ No newline at end of file diff --git a/main/templates/create.html b/main/templates/create.html new file mode 100644 index 0000000..0f87e10 --- /dev/null +++ b/main/templates/create.html @@ -0,0 +1,8 @@ + + + {_title} + + +

{_heading}

+ + \ No newline at end of file diff --git a/main/templates/delete.html b/main/templates/delete.html new file mode 100644 index 0000000..0f87e10 --- /dev/null +++ b/main/templates/delete.html @@ -0,0 +1,8 @@ + + + {_title} + + +

{_heading}

+ + \ No newline at end of file diff --git a/main/templates/drop.html b/main/templates/drop.html new file mode 100644 index 0000000..0f87e10 --- /dev/null +++ b/main/templates/drop.html @@ -0,0 +1,8 @@ + + + {_title} + + +

{_heading}

+ + \ No newline at end of file diff --git a/main/templates/index.html b/main/templates/index.html new file mode 100644 index 0000000..0f87e10 --- /dev/null +++ b/main/templates/index.html @@ -0,0 +1,8 @@ + + + {_title} + + +

{_heading}

+ + \ No newline at end of file diff --git a/main/templates/insert.html b/main/templates/insert.html new file mode 100644 index 0000000..0f87e10 --- /dev/null +++ b/main/templates/insert.html @@ -0,0 +1,8 @@ + + + {_title} + + +

{_heading}

+ + \ No newline at end of file diff --git a/main/templates/select.html b/main/templates/select.html new file mode 100644 index 0000000..0f87e10 --- /dev/null +++ b/main/templates/select.html @@ -0,0 +1,8 @@ + + + {_title} + + +

{_heading}

+ + \ No newline at end of file From 31ffc9e1545ba1c3454deb1542d213b62a5b6715 Mon Sep 17 00:00:00 2001 From: Milan Matousek Date: Wed, 19 Jun 2019 12:50:25 +0200 Subject: [PATCH 4/6] add comments and pep8, add div element to html files --- .../modules/__pycache__/create.cpython-37.pyc | Bin 606 -> 660 bytes .../modules/__pycache__/delete.cpython-37.pyc | Bin 606 -> 660 bytes main/modules/__pycache__/drop.cpython-37.pyc | Bin 596 -> 650 bytes main/modules/__pycache__/index.cpython-37.pyc | Bin 618 -> 672 bytes .../modules/__pycache__/insert.cpython-37.pyc | Bin 606 -> 660 bytes .../modules/__pycache__/select.cpython-37.pyc | Bin 606 -> 660 bytes main/modules/create.py | 2 ++ main/modules/delete.py | 2 ++ main/modules/drop.py | 2 ++ main/modules/index.py | 4 ++- main/modules/insert.py | 2 ++ main/modules/select.py | 2 ++ main/server.py | 26 ++++++++++++++---- main/templates/create.html | 4 ++- main/templates/delete.html | 4 ++- main/templates/drop.html | 4 ++- main/templates/index.html | 4 ++- main/templates/insert.html | 4 ++- main/templates/select.html | 4 ++- 19 files changed, 52 insertions(+), 12 deletions(-) diff --git a/main/modules/__pycache__/create.cpython-37.pyc b/main/modules/__pycache__/create.cpython-37.pyc index 98875cf05fcb05334185af923fb152070609e19c..69634dfaa420bbf639542e40ce30b9610b41d316 100644 GIT binary patch delta 137 zcmcb|GKH1TiI7FQAo=#Qphhz%~L2YNKMX6%S={K$SBFpQAo?oN#)|?Ow3DBNX|&iOHWnE kEU6MLNzE%*m?4lMh#`WZhAE3Fg(-zOg{7CNmbr#Gm_d`( luS&EeHMbxqu_U!vKe;FsNb6;kKT_%u7*7&PdElPgTe) ksS+(o%`M1DEJ-caPf5*5ElJe_sr8%qZaX8(%*m?4lMh#`WZhAE3Fg(-zOg{7CNmbr#Gm_d`( nuS&EeHMbxqu_U!vKP5FMwIo$9qa-(HvI^sNMyAPk7#LLUY00d@2T(J_26ZuxBGX*jPF+?!bFl8~NFsHDju=X<5GS@H%Gib6^ znJD!%du7wCah`b~VbnUQ7kJjQJR5%tH)pZ}<7P&t$yXS+0RUks7gPWM diff --git a/main/modules/__pycache__/index.cpython-37.pyc b/main/modules/__pycache__/index.cpython-37.pyc index 049e39d0545a5408b15980f0dbc950a244dbc52a..83a8ee6164432751ea96d2dbad99c44b4df01b52 100644 GIT binary patch delta 287 zcmaFGvVfJ(iIc4KPUKsk!4$|4#1O$y!<5C8!kogA!rIGJ%Ur`8%%I6u zWuoAlT9T2UqL7wfq>x{bnx{})keZyCmYJ-ekWrGGqmY)Flgh=(nV6TNkerd2m!7JS zSyClZlA2qPlUR~kte=^el3Jk$QtCJHy#nVgw)m3FlAP3AlO-6{C2ujMW!z#1D~V6L z#a5JBT$)p|lA(xaas*>IBg^Csi~(7EK(`k0pc1?wE)$So0pem1gM$&w*JLgd0`hLL d$Yh9Qt4h#`WZhAE3Fg(-zOg{7CNmbr#Gm_d`( zZ!#aF*kn~k1#<$oYbhvevImpQA}wWQS6y{DXA6lX}8#lQj1G-N>(xyaZK)G z3}b>KhzV5%SOX_W0f$X)eoARhsvRSc KR}50d!3+S*`zs^> diff --git a/main/modules/__pycache__/insert.cpython-37.pyc b/main/modules/__pycache__/insert.cpython-37.pyc index 9645888a52d8a24d805198ef9307be605191587c..627bf58da71cdf0311c55d258f6fa69adaa8b083 100644 GIT binary patch delta 137 zcmcb|GKH1TiI7FQAo=#Qphhz%~L2YNKMX6%S={K$SBFpQAo?oN#)|?Ow3DBNX|&iOHWnE lEU6MLNzE%*m?4lMh#`WZhAE3Fg(-zOg{7CNmbr#Gm_d`( nuS&EeHMbxqu_U!vKQpg5wWvfdqa-(HvI^sNMyAPk7XhzPUKsg$rQ*C#1O$y!<5C8!kogA!rIGJ%Ur`8%%I6u zWuoAlT9T2UqL7wfq>x{bnx{})keZyCmYJ-ekWrGGqmY)Flgh=(nV6TNkerd2m!7JS mSyClhlA2qPlUR~ktY4g(lbT$j2U6=d@!fVtmdVQ)cK`s)<|-Qi delta 84 zcmbQjdXI(AiI%*m?4lMh#`WZhAE3Fg(-zOg{7CNmbr#Gm_d`( nuS&EeHMbxqu_U!vzc@7~HMvADqa-(HvI^sNMyAPk7{_title} -

{_heading}

+
+

{_heading}

+
\ No newline at end of file diff --git a/main/templates/delete.html b/main/templates/delete.html index 0f87e10..d3eefd1 100644 --- a/main/templates/delete.html +++ b/main/templates/delete.html @@ -3,6 +3,8 @@ {_title} -

{_heading}

+
+

{_heading}

+
\ No newline at end of file diff --git a/main/templates/drop.html b/main/templates/drop.html index 0f87e10..d3eefd1 100644 --- a/main/templates/drop.html +++ b/main/templates/drop.html @@ -3,6 +3,8 @@ {_title} -

{_heading}

+
+

{_heading}

+
\ No newline at end of file diff --git a/main/templates/index.html b/main/templates/index.html index 0f87e10..d3eefd1 100644 --- a/main/templates/index.html +++ b/main/templates/index.html @@ -3,6 +3,8 @@ {_title} -

{_heading}

+
+

{_heading}

+
\ No newline at end of file diff --git a/main/templates/insert.html b/main/templates/insert.html index 0f87e10..d3eefd1 100644 --- a/main/templates/insert.html +++ b/main/templates/insert.html @@ -3,6 +3,8 @@ {_title} -

{_heading}

+
+

{_heading}

+
\ No newline at end of file diff --git a/main/templates/select.html b/main/templates/select.html index 0f87e10..d3eefd1 100644 --- a/main/templates/select.html +++ b/main/templates/select.html @@ -3,6 +3,8 @@ {_title} -

{_heading}

+
+

{_heading}

+
\ No newline at end of file From ecf165993193baef87cc793831a32228ac7de0d1 Mon Sep 17 00:00:00 2001 From: Milan Matousek Date: Wed, 19 Jun 2019 13:08:54 +0200 Subject: [PATCH 5/6] add closing of files in modules/ --- main/modules/__pycache__/create.cpython-37.pyc | Bin 660 -> 677 bytes main/modules/__pycache__/delete.cpython-37.pyc | Bin 660 -> 677 bytes main/modules/__pycache__/drop.cpython-37.pyc | Bin 650 -> 667 bytes main/modules/__pycache__/index.cpython-37.pyc | Bin 672 -> 689 bytes main/modules/__pycache__/insert.cpython-37.pyc | Bin 660 -> 677 bytes main/modules/__pycache__/select.cpython-37.pyc | Bin 660 -> 677 bytes main/modules/create.py | 3 ++- main/modules/delete.py | 3 ++- main/modules/drop.py | 3 ++- main/modules/index.py | 1 + main/modules/insert.py | 3 ++- main/modules/select.py | 3 ++- 12 files changed, 11 insertions(+), 5 deletions(-) diff --git a/main/modules/__pycache__/create.cpython-37.pyc b/main/modules/__pycache__/create.cpython-37.pyc index 69634dfaa420bbf639542e40ce30b9610b41d316..a19dabf0b43e378e9ff908998b53eba61fe24cf7 100644 GIT binary patch delta 186 zcmbQjx|EgIiI${XS=36ZJ1*v(rSc*~;Q*N=PbAh(DImEfHmz$C3C1Qfi*mYB*lLP>T-X6FB diff --git a/main/modules/__pycache__/delete.cpython-37.pyc b/main/modules/__pycache__/delete.cpython-37.pyc index 2fb081f2bf0c101855b3e7d3c355525608ac1083..91f6df37cc0229f9fa65aa56d55c3b8dfb3b4fc9 100644 GIT binary patch delta 186 zcmbQjx|EgIiI$fsuD|En^_W5Ed>*Ax1t%j>$I}-Lv?CrWWy{5_}*o w6Odp5;$jekgAvTvWG)g0@@}!^CuOB3mw?5vX}-l_lbfGXnv-hB2seQl0Bvd~1poj5 delta 168 zcmbQu+QrK2#LLUY00d@2T(J@pc_%aKOPO2Rv+yrI-n;;uq diff --git a/main/modules/__pycache__/index.cpython-37.pyc b/main/modules/__pycache__/index.cpython-37.pyc index 83a8ee6164432751ea96d2dbad99c44b4df01b52..e6ffd50186b4ec546836162d60a0b1d2c1460edd 100644 GIT binary patch delta 179 zcmZ3$x{;OFiIf~HT1xDV7LRA6Qzz0&mVUwGmQks)$#|Y#VgOqVF0|1RLCoBK} delta 146 zcmdnUx`36}iIc4mh!y z!o?`W$T#^9qqis@kXyuqO7KpOVUo5I0t((@%TLNmO)e>7LRA6Qzzb5qVUwGmQks)$ N#|Y#VgOqVF0|1)78cSaORsIVZn3RTC&#oSKt%izzMR7JFu1N@_)X+AX%C)Z)^dl9dcaypx+5 zgCXX#a4`xo@-cEue#q!4$`7=#h!>UMn{3Y{tt1Q-yv3HEl$DxXQpAL+0<3{=at)IN E0Q&tdkN^Mx delta 142 zcmZ3=I)#{XS=36ZJ1*v(rSc*~;Q*N=PbAh(DImEfHmz$C3C1Qfi*mYB*lLP>HMIN63 diff --git a/main/modules/__pycache__/select.cpython-37.pyc b/main/modules/__pycache__/select.cpython-37.pyc index 07901ad04838e290ca612e21380c9f43f0fadcd8..2025e6dc0b5f3de7472365778449196203f67656 100644 GIT binary patch delta 186 zcmbQjx|EgIiIXi4H*vAv#G5su%(qzb3sUoLu@t2yrrcsn%P-1J zESX%$sKCfEc@kqVHwQ=;3m2mhBj4mtjGm$(Q;I->NCfBP048ZAKA_+&w)~{5)Z~&P OCR7z*4V;sEnIr(>G#^m_ diff --git a/main/modules/create.py b/main/modules/create.py index 97fa253..760338f 100644 --- a/main/modules/create.py +++ b/main/modules/create.py @@ -9,4 +9,5 @@ class create(object): with open('templates/create.html') as fh: index_f = fh.read() result = index_f.format(_title='create_strana', _heading='create') - return result \ No newline at end of file + fh.close() + return result diff --git a/main/modules/delete.py b/main/modules/delete.py index f3c0b86..4cfb52e 100644 --- a/main/modules/delete.py +++ b/main/modules/delete.py @@ -9,4 +9,5 @@ class delete(object): with open('templates/delete.html') as fh: index_f = fh.read() result = index_f.format(_title='delete_strana', _heading='delete') - return result \ No newline at end of file + fh.close() + return result diff --git a/main/modules/drop.py b/main/modules/drop.py index 01a30ff..9c2c026 100644 --- a/main/modules/drop.py +++ b/main/modules/drop.py @@ -9,4 +9,5 @@ class drop(object): with open('templates/drop.html') as fh: index_f = fh.read() result = index_f.format(_title='drop_strana', _heading='drop') - return result \ No newline at end of file + fh.close() + return result diff --git a/main/modules/index.py b/main/modules/index.py index 5fdf934..b89c8c7 100644 --- a/main/modules/index.py +++ b/main/modules/index.py @@ -9,4 +9,5 @@ class wellcome(object): with open('templates/index.html') as fh: index_f = fh.read() result = index_f.format(_title='Titulni_strana', _heading='Vítejte!') + fh.close() return result diff --git a/main/modules/insert.py b/main/modules/insert.py index 36ae8d8..ff6b04f 100644 --- a/main/modules/insert.py +++ b/main/modules/insert.py @@ -9,4 +9,5 @@ class insert(object): with open('templates/insert.html') as fh: index_f = fh.read() result = index_f.format(_title='insert_strana', _heading='insert') - return result \ No newline at end of file + fh.close() + return result diff --git a/main/modules/select.py b/main/modules/select.py index f5977c1..88e0700 100644 --- a/main/modules/select.py +++ b/main/modules/select.py @@ -9,4 +9,5 @@ class select(object): with open('templates/select.html') as fh: index_f = fh.read() result = index_f.format(_title='select_strana', _heading='select') - return result \ No newline at end of file + fh.close() + return result From 4ab35e28285d83dc71127b5773fc3605fbe3ac80 Mon Sep 17 00:00:00 2001 From: Milan Matousek Date: Fri, 21 Jun 2019 10:23:30 +0200 Subject: [PATCH 6/6] add menu to main page to load sub-pages --- main/templates/index.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/main/templates/index.html b/main/templates/index.html index d3eefd1..61d54cc 100644 --- a/main/templates/index.html +++ b/main/templates/index.html @@ -6,5 +6,20 @@

{_heading}

+
+

For select page click HERE

+
+
+

For delete page click HERE

+
+
+

For insert page click HERE

+
+
+

For create page click HERE

+
+
+

For drop page click HERE

+
\ No newline at end of file