add comments and pep8, add div element to html files
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -4,6 +4,8 @@ import cherrypy
|
|||||||
class create(object):
|
class create(object):
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def index(self):
|
def index(self):
|
||||||
|
''' Method for open specific html file
|
||||||
|
and change it'''
|
||||||
with open('templates/create.html') as fh:
|
with open('templates/create.html') as fh:
|
||||||
index_f = fh.read()
|
index_f = fh.read()
|
||||||
result = index_f.format(_title='create_strana', _heading='create')
|
result = index_f.format(_title='create_strana', _heading='create')
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import cherrypy
|
|||||||
class delete(object):
|
class delete(object):
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def index(self):
|
def index(self):
|
||||||
|
''' Method for open specific html file
|
||||||
|
and change it'''
|
||||||
with open('templates/delete.html') as fh:
|
with open('templates/delete.html') as fh:
|
||||||
index_f = fh.read()
|
index_f = fh.read()
|
||||||
result = index_f.format(_title='delete_strana', _heading='delete')
|
result = index_f.format(_title='delete_strana', _heading='delete')
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import cherrypy
|
|||||||
class drop(object):
|
class drop(object):
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def index(self):
|
def index(self):
|
||||||
|
''' Method for open specific html file
|
||||||
|
and change it'''
|
||||||
with open('templates/drop.html') as fh:
|
with open('templates/drop.html') as fh:
|
||||||
index_f = fh.read()
|
index_f = fh.read()
|
||||||
result = index_f.format(_title='drop_strana', _heading='drop')
|
result = index_f.format(_title='drop_strana', _heading='drop')
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import cherrypy
|
|||||||
class wellcome(object):
|
class wellcome(object):
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def index(self):
|
def index(self):
|
||||||
|
''' Method for open specific html file
|
||||||
|
and change it'''
|
||||||
with open('templates/index.html') as fh:
|
with open('templates/index.html') as fh:
|
||||||
index_f = fh.read()
|
index_f = fh.read()
|
||||||
result = index_f.format(_title='Titulni_strana', _heading='Vítejte!')
|
result = index_f.format(_title='Titulni_strana', _heading='Vítejte!')
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import cherrypy
|
|||||||
class insert(object):
|
class insert(object):
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def index(self):
|
def index(self):
|
||||||
|
''' Method for open specific html file
|
||||||
|
and change it'''
|
||||||
with open('templates/insert.html') as fh:
|
with open('templates/insert.html') as fh:
|
||||||
index_f = fh.read()
|
index_f = fh.read()
|
||||||
result = index_f.format(_title='insert_strana', _heading='insert')
|
result = index_f.format(_title='insert_strana', _heading='insert')
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import cherrypy
|
|||||||
class select(object):
|
class select(object):
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def index(self):
|
def index(self):
|
||||||
|
''' Method for open specific html file
|
||||||
|
and change it'''
|
||||||
with open('templates/select.html') as fh:
|
with open('templates/select.html') as fh:
|
||||||
index_f = fh.read()
|
index_f = fh.read()
|
||||||
result = index_f.format(_title='select_strana', _heading='select')
|
result = index_f.format(_title='select_strana', _heading='select')
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#Comments and PEP8 format TODO
|
|
||||||
import cherrypy
|
import cherrypy
|
||||||
import os
|
import os
|
||||||
|
|
||||||
@@ -13,9 +12,26 @@ SCRIPT_PATH = os.path.abspath(os.path.dirname(__file__))
|
|||||||
|
|
||||||
|
|
||||||
class main_server_loop(object):
|
class main_server_loop(object):
|
||||||
cherrypy.config.update({'server.socket_host': '127.0.0.1',
|
''' Main class for start cherrypy server
|
||||||
'server.socket_port': 80,
|
|
||||||
})
|
Settings for server socket port and how are sub-modules
|
||||||
|
called and mounted to their respective paths
|
||||||
|
|
||||||
|
Args:
|
||||||
|
*None*
|
||||||
|
|
||||||
|
Sets:
|
||||||
|
*conf:* dict(), per-application configuration
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
*N/A*
|
||||||
|
|
||||||
|
Raises:
|
||||||
|
*Exception* Server is unable to start
|
||||||
|
|
||||||
|
'''
|
||||||
|
|
||||||
|
cherrypy.config.update({'server.socket_port': 80})
|
||||||
conf = {
|
conf = {
|
||||||
'/': {
|
'/': {
|
||||||
'tools.sessions.on': True,
|
'tools.sessions.on': True,
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
<title>{_title}</title>
|
<title>{_title}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>{_heading}</h1>
|
<div>
|
||||||
|
<h1>{_heading}</h1>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -3,6 +3,8 @@
|
|||||||
<title>{_title}</title>
|
<title>{_title}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>{_heading}</h1>
|
<div>
|
||||||
|
<h1>{_heading}</h1>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -3,6 +3,8 @@
|
|||||||
<title>{_title}</title>
|
<title>{_title}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>{_heading}</h1>
|
<div>
|
||||||
|
<h1>{_heading}</h1>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -3,6 +3,8 @@
|
|||||||
<title>{_title}</title>
|
<title>{_title}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>{_heading}</h1>
|
<div>
|
||||||
|
<h1>{_heading}</h1>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -3,6 +3,8 @@
|
|||||||
<title>{_title}</title>
|
<title>{_title}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>{_heading}</h1>
|
<div>
|
||||||
|
<h1>{_heading}</h1>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -3,6 +3,8 @@
|
|||||||
<title>{_title}</title>
|
<title>{_title}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>{_heading}</h1>
|
<div>
|
||||||
|
<h1>{_heading}</h1>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user