mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Advanced export box now obeys allow_csv_stream config - refs #266
This commit is contained in:
parent
04c896160a
commit
54f805dca3
3 changed files with 2 additions and 2 deletions
|
|
@ -146,7 +146,7 @@
|
||||||
CSV options:
|
CSV options:
|
||||||
<label><input type="checkbox" name="_dl"> download file</label>
|
<label><input type="checkbox" name="_dl"> download file</label>
|
||||||
{% if expandable_columns %}<label><input type="checkbox" name="_labels"> expand labels</label>{% endif %}
|
{% if expandable_columns %}<label><input type="checkbox" name="_labels"> expand labels</label>{% endif %}
|
||||||
{% if next_url %}<label><input type="checkbox" name="_stream"> stream all rows</label>{% endif %}
|
{% if next_url and config.allow_csv_stream %}<label><input type="checkbox" name="_stream"> stream all rows</label>{% endif %}
|
||||||
<input type="submit" value="Export CSV">
|
<input type="submit" value="Export CSV">
|
||||||
{% for key, value in url_csv_args.items() %}
|
{% for key, value in url_csv_args.items() %}
|
||||||
{% if key != "_labels" %}
|
{% if key != "_labels" %}
|
||||||
|
|
|
||||||
|
|
@ -401,6 +401,7 @@ class BaseView(RenderMixin):
|
||||||
"extra_css_urls": self.ds.extra_css_urls(),
|
"extra_css_urls": self.ds.extra_css_urls(),
|
||||||
"extra_js_urls": self.ds.extra_js_urls(),
|
"extra_js_urls": self.ds.extra_js_urls(),
|
||||||
"datasette_version": __version__,
|
"datasette_version": __version__,
|
||||||
|
"config": self.ds.config,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if "metadata" not in context:
|
if "metadata" not in context:
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ class DatabaseView(BaseView):
|
||||||
{"name": query_name, "sql": query_sql}
|
{"name": query_name, "sql": query_sql}
|
||||||
for query_name, query_sql in (metadata.get("queries") or {}).items()
|
for query_name, query_sql in (metadata.get("queries") or {}).items()
|
||||||
],
|
],
|
||||||
"config": self.ds.config,
|
|
||||||
}, {
|
}, {
|
||||||
"database_hash": hash,
|
"database_hash": hash,
|
||||||
"show_hidden": request.args.get("_show_hidden"),
|
"show_hidden": request.args.get("_show_hidden"),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue