Fixed remaining places that needed datasette.urls, closes #1025

This commit is contained in:
Simon Willison 2020-10-19 22:21:19 -07:00
commit 091441a444
8 changed files with 15 additions and 14 deletions

View file

@ -457,10 +457,12 @@ def serve(
# Start the server
if root:
url = "http://{}:{}/-/auth-token?token={}".format(host, port, ds._root_token)
url = "http://{}:{}{}?token={}".format(
host, port, ds.urls.path("-/auth-token"), ds._root_token
)
print(url)
else:
url = "http://{}:{}/".format(host, port)
url = "http://{}:{}{}".format(host, port, ds.urls.instance())
if open_browser:
webbrowser.open(url)
uvicorn.run(