Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
EDsCODE committed Sep 4, 2024
1 parent 312de24 commit b21187b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions posthog/api/insight.py
Original file line number Diff line number Diff line change
Expand Up @@ -895,12 +895,12 @@ def trend(self, request: request.Request, *args: Any, **kwargs: Any):
export = "{}/insights/{}/\n".format(SITE_URL, request.GET["export_insight_id"]).encode() + export

response = HttpResponse(export)
response[
"Content-Disposition"
] = 'attachment; filename="{name} ({date_from} {date_to}) from PostHog.csv"'.format(
name=slugify(request.GET.get("export_name", "export")),
date_from=filter.date_from.strftime("%Y-%m-%d -") if filter.date_from else "up until",
date_to=filter.date_to.strftime("%Y-%m-%d"),
response["Content-Disposition"] = (
'attachment; filename="{name} ({date_from} {date_to}) from PostHog.csv"'.format(
name=slugify(request.GET.get("export_name", "export")),
date_from=filter.date_from.strftime("%Y-%m-%d -") if filter.date_from else "up until",
date_to=filter.date_to.strftime("%Y-%m-%d"),
)
)
return response

Expand Down

0 comments on commit b21187b

Please sign in to comment.