summaryrefslogtreecommitdiff
path: root/docs/howto/outputting-csv.txt
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2012-10-03 14:43:36 -0400
committerTim Graham <timograham@gmail.com>2012-10-03 17:44:56 -0400
commit234ca6c61d27d1cd430a5290ff858c25afb93098 (patch)
tree4311b26a157c118d2e49927fcf9c97dc2e65d231 /docs/howto/outputting-csv.txt
parent1c03b23567a3098b9ab5df64b14e0dea8d1414ea (diff)
Fixed #19006 - Quoted filenames in Content-Disposition header.
Diffstat (limited to 'docs/howto/outputting-csv.txt')
-rw-r--r--docs/howto/outputting-csv.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/howto/outputting-csv.txt b/docs/howto/outputting-csv.txt
index 1a606069b8..bcc6f3827b 100644
--- a/docs/howto/outputting-csv.txt
+++ b/docs/howto/outputting-csv.txt
@@ -21,7 +21,7 @@ Here's an example::
def some_view(request):
# Create the HttpResponse object with the appropriate CSV header.
response = HttpResponse(mimetype='text/csv')
- response['Content-Disposition'] = 'attachment; filename=somefilename.csv'
+ response['Content-Disposition'] = 'attachment; filename="somefilename.csv"'
writer = csv.writer(response)
writer.writerow(['First row', 'Foo', 'Bar', 'Baz'])
@@ -93,7 +93,7 @@ Here's an example, which generates the same CSV file as above::
def some_view(request):
# Create the HttpResponse object with the appropriate CSV header.
response = HttpResponse(mimetype='text/csv')
- response['Content-Disposition'] = 'attachment; filename=somefilename.csv'
+ response['Content-Disposition'] = 'attachment; filename="somefilename.csv"'
# The data is hard-coded here, but you could load it from a database or
# some other source.