diff options
Diffstat (limited to 'bin/web_kbn.py')
-rw-r--r-- | bin/web_kbn.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/web_kbn.py b/bin/web_kbn.py index a0f12a6..18b50ad 100644 --- a/bin/web_kbn.py +++ b/bin/web_kbn.py @@ -40,17 +40,18 @@ class WebKbnConfig(AppConfigUnit): common_static_files = [ 'bootstrap.min.css', - 'bootstrap.min.js', + 'bootstrap.bundle.min.js', 'polyfills.js', 'app.js', 'app.css' ] +static_version = 3 routes = web.RouteTableDef() webkbn_strings = Translation('web_kbn') logger = logging.getLogger(__name__) -def get_js_link(file, version) -> str: +def get_js_link(file, version=static_version) -> str: if is_development_mode(): version = int(time.time()) if version: @@ -58,7 +59,7 @@ def get_js_link(file, version) -> str: return f'<script src="{config.app_config["assets_public_path"]}/{file}" type="text/javascript"></script>' -def get_css_link(file, version) -> str: +def get_css_link(file, version=static_version) -> str: if is_development_mode(): version = int(time.time()) if version: @@ -71,7 +72,6 @@ def get_head_static(files=None) -> str: if files is None: files = [] for file in common_static_files + files: - v = 2 try: q_ind = file.index('?') v = file[q_ind+1:] @@ -80,9 +80,9 @@ def get_head_static(files=None) -> str: pass if file.endswith('.js'): - buf.write(get_js_link(file, v)) + buf.write(get_js_link(file)) else: - buf.write(get_css_link(file, v)) + buf.write(get_css_link(file)) return buf.getvalue() |