forked from DGNum/gestioCOF
mimetype is now content_type (Django 1.7)
This commit is contained in:
parent
8adb59ad06
commit
28bd07a433
2 changed files with 4 additions and 4 deletions
|
@ -6,7 +6,7 @@ from django.contrib.auth.models import User
|
|||
|
||||
def export(qs, fields=None):
|
||||
model = qs.model
|
||||
response = HttpResponse(mimetype='text/csv')
|
||||
response = HttpResponse(content_type='text/csv')
|
||||
response['Content-Disposition'] = 'attachment; filename=%s.csv' % slugify(model.__name__)
|
||||
writer = csv.writer(response)
|
||||
# Write headers to CSV file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue