mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
request.url now respects force_https_urls, closes #781
This commit is contained in:
parent
40885ef24e
commit
7bb30c1f11
3 changed files with 14 additions and 0 deletions
|
|
@ -46,6 +46,9 @@ def render_cell(value, database):
|
|||
|
||||
@hookimpl
|
||||
def extra_template_vars(template, database, table, view_name, request, datasette):
|
||||
# This helps unit tests that want to run assertions against the request object:
|
||||
datasette._last_request = request
|
||||
|
||||
async def query_database(sql):
|
||||
first_db = list(datasette.databases.keys())[0]
|
||||
return (await datasette.execute(first_db, sql)).rows[0][0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue