a few examples

This commit is contained in:
2019-06-18 08:51:21 +02:00
parent 3531d493d8
commit 85f1a27e94
4 changed files with 49 additions and 4 deletions

View File

@@ -4,7 +4,10 @@ import cherrypy
class HelloWorld(object):
@cherrypy.expose
def index(self):
return "Hello World!"
with open('./templates/index.html') as fh:
index_f = fh.read()
result = index_f.format(_title='Nazev_stranky', _nadpis='Cokoliv!')
return result
cherrypy.quickstart(HelloWorld())