mimetype is now content_type (Django 1.7)

This commit is contained in:
Basile Clement 2016-05-23 23:57:03 +02:00
parent 8adb59ad06
commit 28bd07a433
2 changed files with 4 additions and 4 deletions

View file

@ -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