justpy-org / justpy

An object oriented high-level Python Web Framework that requires no frontend programming
https://justpy.io
Apache License 2.0
1.22k stars 96 forks source link

Unnamed folder under js template #681

Closed GavinLeongMO closed 1 year ago

GavinLeongMO commented 1 year ago
def as_script_src(self,file_name:str, indent:str="  ", subdir=""):
        src= f"{indent}<script src='/templates/js{subdir}/{file_name}.js'></script>\n"
        return src

This function returns src as "/templates/js//event_handler.js" and "/templates/js//justpy_core.js", which creates an unnammed folder under the js template in the page source of Chrome developer tools if the subdir is an empty string.