add templates and modules + connect to load pages using url (/section/)..TODO: comments and PEP8

This commit is contained in:
2019-06-18 15:57:13 +02:00
parent 27ba065956
commit 9c9c5dd437
18 changed files with 108 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

10
main/modules/create.py Normal file
View 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
View 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
View 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
View 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
View 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
View 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