From a2bd156f478f214af054935154f3d4ba7dc3aa67 Mon Sep 17 00:00:00 2001 From: Stefan Koegl Date: Tue, 27 Apr 2010 12:37:32 +0200 Subject: [PATCH] send Content-Disposition header for subscription opml download --- mygpo/web/views/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mygpo/web/views/__init__.py b/mygpo/web/views/__init__.py index aec05494..35ed983b 100644 --- a/mygpo/web/views/__init__.py +++ b/mygpo/web/views/__init__.py @@ -535,5 +535,7 @@ def user_subscriptions(request, username): @login_required def all_subscriptions_download(request): podcasts = set([s.podcast for s in Subscription.objects.filter(user=request.user)]) - return simple.format_subscriptions(podcasts, 'opml', request.user.username) + response = simple.format_subscriptions(podcasts, 'opml', request.user.username) + response['Content-Disposition'] = 'attachment; filename=all-subscriptions.opml' + return response -- 2.11.4.GIT