def get_static_hashes(*args, **kwargs): path = utils.local_to_browser_path( os.path.join(settings.PROJECT_PATH, settings.STATIC_HASHES_OUTPUT_JS) ) hash = utils.get_current_hash() tmpl = '<script type="text/javascript" src="{path}?hash={hash}"></script>' return tmpl.format(path=path, hash=hash)
def get_static_hashes(*args, **kwargs): path = utils.local_to_browser_path( os.path.join(settings.STATIC_HASHES_OUTPUT_DIR, 'static-hashes.js') #settings.STATIC_HASHES_OUTPUT_JS ) hash = utils.get_current_hash() tmpl = '<script type="text/javascript" src="{path}?hash={hash}"></script>' return tmpl.format(path=path, hash=hash)
def transform_path(path): """Convert local path to path browser will be requesting.""" return utils.local_to_browser_path(path)