From 9c9c5dd437e2aa1bd114bab31426cce7b4b8a584 Mon Sep 17 00:00:00 2001 From: Milan Matousek Date: Tue, 18 Jun 2019 15:57:13 +0200 Subject: [PATCH] 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