Serve WebUI handlers and update-bundled-web-ui script, Ref: #1362

This commit is contained in:
ziajka
2018-06-26 12:09:08 +02:00
parent 6dc2ae8641
commit 0e1f2e26d0
7 changed files with 98 additions and 10 deletions

View File

@ -24,6 +24,15 @@ def get_static_path(filename):
:param filename: relative filename
:return: absolute path
"""
current_dir = os.path.dirname(os.path.abspath(__file__))
static_directory = os.path.abspath(os.path.join(current_dir, '..', 'static'))
static_directory = get_static_dir()
return os.path.join(static_directory, filename)
def get_static_dir():
"""
Returns location of static directory
:return: absolute path
"""
current_dir = os.path.dirname(os.path.abspath(__file__))
return os.path.abspath(os.path.join(current_dir, '..', 'static'))