add closing of files in modules/

This commit is contained in:
2019-06-19 13:08:54 +02:00
parent 31ffc9e154
commit ecf1659931
12 changed files with 11 additions and 5 deletions

View File

@@ -9,4 +9,5 @@ class create(object):
with open('templates/create.html') as fh:
index_f = fh.read()
result = index_f.format(_title='create_strana', _heading='create')
fh.close()
return result

View File

@@ -9,4 +9,5 @@ class delete(object):
with open('templates/delete.html') as fh:
index_f = fh.read()
result = index_f.format(_title='delete_strana', _heading='delete')
fh.close()
return result

View File

@@ -9,4 +9,5 @@ class drop(object):
with open('templates/drop.html') as fh:
index_f = fh.read()
result = index_f.format(_title='drop_strana', _heading='drop')
fh.close()
return result

View File

@@ -9,4 +9,5 @@ class wellcome(object):
with open('templates/index.html') as fh:
index_f = fh.read()
result = index_f.format(_title='Titulni_strana', _heading='Vítejte!')
fh.close()
return result

View File

@@ -9,4 +9,5 @@ class insert(object):
with open('templates/insert.html') as fh:
index_f = fh.read()
result = index_f.format(_title='insert_strana', _heading='insert')
fh.close()
return result

View File

@@ -9,4 +9,5 @@ class select(object):
with open('templates/select.html') as fh:
index_f = fh.read()
result = index_f.format(_title='select_strana', _heading='select')
fh.close()
return result