show/hide link for SQL on custom query page

Closes #415
This commit is contained in:
Simon Willison 2019-03-14 22:22:24 -07:00
commit afe9aa3ae0
3 changed files with 31 additions and 5 deletions

View file

@ -23,6 +23,7 @@ from datasette.utils import (
is_url,
path_from_row_pks,
path_with_added_args,
path_with_removed_args,
path_with_format,
remove_infinites,
resolve_table_and_format,
@ -578,6 +579,10 @@ class BaseView(RenderMixin):
"canned_query": canned_query,
"metadata": metadata,
"config": self.ds.config_dict(),
"request": request,
"path_with_added_args": path_with_added_args,
"path_with_removed_args": path_with_removed_args,
"hide_sql": "_hide_sql" in params,
}
return {