Give a default endpoint name. Make js() property use url_for(endpoint) instead of path, in case Flask is not hosted on / of a server