home / docs / sections

sections: internals:datasette-absolute-url

This data as json

id page ref title content breadcrumbs references
internals:datasette-absolute-url internals datasette-absolute-url .absolute_url(request, path) request - Request The current Request object path - string A path, for example /dbname/table.json Returns the absolute URL for the given path, including the protocol and host. For example: absolute_url = datasette.absolute_url( request, "/dbname/table.json" ) # Would return "http://localhost:8001/dbname/table.json" The current request object is used to determine the hostname and protocol that should be used for the returned URL. The force_https_urls configuration setting is taken into account. ["Internals for plugins", "Datasette class"] []
Powered by Datasette · Queries took 0.897ms