diff --git a/main/modules/__pycache__/create.cpython-37.pyc b/main/modules/__pycache__/create.cpython-37.pyc index 98875cf..69634df 100644 Binary files a/main/modules/__pycache__/create.cpython-37.pyc and b/main/modules/__pycache__/create.cpython-37.pyc differ diff --git a/main/modules/__pycache__/delete.cpython-37.pyc b/main/modules/__pycache__/delete.cpython-37.pyc index 4380b09..2fb081f 100644 Binary files a/main/modules/__pycache__/delete.cpython-37.pyc and b/main/modules/__pycache__/delete.cpython-37.pyc differ diff --git a/main/modules/__pycache__/drop.cpython-37.pyc b/main/modules/__pycache__/drop.cpython-37.pyc index 1a913b7..4258034 100644 Binary files a/main/modules/__pycache__/drop.cpython-37.pyc and b/main/modules/__pycache__/drop.cpython-37.pyc differ diff --git a/main/modules/__pycache__/index.cpython-37.pyc b/main/modules/__pycache__/index.cpython-37.pyc index 049e39d..83a8ee6 100644 Binary files a/main/modules/__pycache__/index.cpython-37.pyc and b/main/modules/__pycache__/index.cpython-37.pyc differ diff --git a/main/modules/__pycache__/insert.cpython-37.pyc b/main/modules/__pycache__/insert.cpython-37.pyc index 9645888..627bf58 100644 Binary files a/main/modules/__pycache__/insert.cpython-37.pyc and b/main/modules/__pycache__/insert.cpython-37.pyc differ diff --git a/main/modules/__pycache__/select.cpython-37.pyc b/main/modules/__pycache__/select.cpython-37.pyc index 41f769c..07901ad 100644 Binary files a/main/modules/__pycache__/select.cpython-37.pyc and b/main/modules/__pycache__/select.cpython-37.pyc differ diff --git a/main/modules/create.py b/main/modules/create.py index 5c79148..97fa253 100644 --- a/main/modules/create.py +++ b/main/modules/create.py @@ -4,6 +4,8 @@ import cherrypy class create(object): @cherrypy.expose def index(self): + ''' Method for open specific html file + and change it''' with open('templates/create.html') as fh: index_f = fh.read() result = index_f.format(_title='create_strana', _heading='create') diff --git a/main/modules/delete.py b/main/modules/delete.py index 16f0e52..f3c0b86 100644 --- a/main/modules/delete.py +++ b/main/modules/delete.py @@ -4,6 +4,8 @@ import cherrypy class delete(object): @cherrypy.expose def index(self): + ''' Method for open specific html file + and change it''' with open('templates/delete.html') as fh: index_f = fh.read() result = index_f.format(_title='delete_strana', _heading='delete') diff --git a/main/modules/drop.py b/main/modules/drop.py index 0ea9e50..01a30ff 100644 --- a/main/modules/drop.py +++ b/main/modules/drop.py @@ -4,6 +4,8 @@ import cherrypy class drop(object): @cherrypy.expose def index(self): + ''' Method for open specific html file + and change it''' with open('templates/drop.html') as fh: index_f = fh.read() result = index_f.format(_title='drop_strana', _heading='drop') diff --git a/main/modules/index.py b/main/modules/index.py index 5f86243..5fdf934 100644 --- a/main/modules/index.py +++ b/main/modules/index.py @@ -4,7 +4,9 @@ import cherrypy class wellcome(object): @cherrypy.expose def index(self): + ''' Method for open specific html file + and change it''' 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 + return result diff --git a/main/modules/insert.py b/main/modules/insert.py index d8cf708..36ae8d8 100644 --- a/main/modules/insert.py +++ b/main/modules/insert.py @@ -4,6 +4,8 @@ import cherrypy class insert(object): @cherrypy.expose def index(self): + ''' Method for open specific html file + and change it''' with open('templates/insert.html') as fh: index_f = fh.read() result = index_f.format(_title='insert_strana', _heading='insert') diff --git a/main/modules/select.py b/main/modules/select.py index be0e519..f5977c1 100644 --- a/main/modules/select.py +++ b/main/modules/select.py @@ -4,6 +4,8 @@ import cherrypy class select(object): @cherrypy.expose def index(self): + ''' Method for open specific html file + and change it''' with open('templates/select.html') as fh: index_f = fh.read() result = index_f.format(_title='select_strana', _heading='select') diff --git a/main/server.py b/main/server.py index 518eddd..c310632 100644 --- a/main/server.py +++ b/main/server.py @@ -1,4 +1,3 @@ -#Comments and PEP8 format TODO import cherrypy import os @@ -13,9 +12,26 @@ SCRIPT_PATH = os.path.abspath(os.path.dirname(__file__)) class main_server_loop(object): - cherrypy.config.update({'server.socket_host': '127.0.0.1', - 'server.socket_port': 80, - }) + ''' Main class for start cherrypy server + + 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 = { '/': { 'tools.sessions.on': True, @@ -40,4 +56,4 @@ if __name__ == '__main__': try: main_server_loop() except Exception as e: - raise e \ No newline at end of file + raise e diff --git a/main/templates/create.html b/main/templates/create.html index 0f87e10..d3eefd1 100644 --- a/main/templates/create.html +++ b/main/templates/create.html @@ -3,6 +3,8 @@ {_title} -

{_heading}

+
+

{_heading}

+
\ No newline at end of file diff --git a/main/templates/delete.html b/main/templates/delete.html index 0f87e10..d3eefd1 100644 --- a/main/templates/delete.html +++ b/main/templates/delete.html @@ -3,6 +3,8 @@ {_title} -

{_heading}

+
+

{_heading}

+
\ No newline at end of file diff --git a/main/templates/drop.html b/main/templates/drop.html index 0f87e10..d3eefd1 100644 --- a/main/templates/drop.html +++ b/main/templates/drop.html @@ -3,6 +3,8 @@ {_title} -

{_heading}

+
+

{_heading}

+
\ No newline at end of file diff --git a/main/templates/index.html b/main/templates/index.html index 0f87e10..d3eefd1 100644 --- a/main/templates/index.html +++ b/main/templates/index.html @@ -3,6 +3,8 @@ {_title} -

{_heading}

+
+

{_heading}

+
\ No newline at end of file diff --git a/main/templates/insert.html b/main/templates/insert.html index 0f87e10..d3eefd1 100644 --- a/main/templates/insert.html +++ b/main/templates/insert.html @@ -3,6 +3,8 @@ {_title} -

{_heading}

+
+

{_heading}

+
\ No newline at end of file diff --git a/main/templates/select.html b/main/templates/select.html index 0f87e10..d3eefd1 100644 --- a/main/templates/select.html +++ b/main/templates/select.html @@ -3,6 +3,8 @@ {_title} -

{_heading}

+
+

{_heading}

+
\ No newline at end of file