add templates and modules + connect to load pages using url (/section/)..TODO: comments and PEP8
This commit is contained in:
BIN
main/modules/__pycache__/create.cpython-37.pyc
Normal file
BIN
main/modules/__pycache__/create.cpython-37.pyc
Normal file
Binary file not shown.
BIN
main/modules/__pycache__/delete.cpython-37.pyc
Normal file
BIN
main/modules/__pycache__/delete.cpython-37.pyc
Normal file
Binary file not shown.
BIN
main/modules/__pycache__/drop.cpython-37.pyc
Normal file
BIN
main/modules/__pycache__/drop.cpython-37.pyc
Normal file
Binary file not shown.
BIN
main/modules/__pycache__/index.cpython-37.pyc
Normal file
BIN
main/modules/__pycache__/index.cpython-37.pyc
Normal file
Binary file not shown.
BIN
main/modules/__pycache__/insert.cpython-37.pyc
Normal file
BIN
main/modules/__pycache__/insert.cpython-37.pyc
Normal file
Binary file not shown.
BIN
main/modules/__pycache__/select.cpython-37.pyc
Normal file
BIN
main/modules/__pycache__/select.cpython-37.pyc
Normal file
Binary file not shown.
10
main/modules/create.py
Normal file
10
main/modules/create.py
Normal file
@@ -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
|
||||||
10
main/modules/delete.py
Normal file
10
main/modules/delete.py
Normal file
@@ -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
|
||||||
10
main/modules/drop.py
Normal file
10
main/modules/drop.py
Normal file
@@ -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
|
||||||
10
main/modules/index.py
Normal file
10
main/modules/index.py
Normal file
@@ -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
|
||||||
10
main/modules/insert.py
Normal file
10
main/modules/insert.py
Normal file
@@ -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
|
||||||
10
main/modules/select.py
Normal file
10
main/modules/select.py
Normal file
@@ -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
|
||||||
8
main/templates/create.html
Normal file
8
main/templates/create.html
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>{_title}</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>{_heading}</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
8
main/templates/delete.html
Normal file
8
main/templates/delete.html
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>{_title}</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>{_heading}</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
8
main/templates/drop.html
Normal file
8
main/templates/drop.html
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>{_title}</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>{_heading}</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
8
main/templates/index.html
Normal file
8
main/templates/index.html
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>{_title}</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>{_heading}</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
8
main/templates/insert.html
Normal file
8
main/templates/insert.html
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>{_title}</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>{_heading}</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
8
main/templates/select.html
Normal file
8
main/templates/select.html
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>{_title}</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>{_heading}</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user