mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
_header=off option for CSV export, closes #1133
This commit is contained in:
parent
7ef80d0145
commit
2c0aca4887
3 changed files with 26 additions and 1 deletions
|
|
@ -307,7 +307,8 @@ class DataView(BaseView):
|
|||
if not first:
|
||||
data, _, _ = await self.data(request, database, hash, **kwargs)
|
||||
if first:
|
||||
await writer.writerow(headings)
|
||||
if request.args.get("_header") != "off":
|
||||
await writer.writerow(headings)
|
||||
first = False
|
||||
next = data.get("next")
|
||||
for row in data["rows"]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue