mimetype -> content_type
mimetype is deprecated and to be removed in Django 1.7.
This commit is contained in:
parent
280a2c2d20
commit
e9c97a9586
2 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ def export_as_csv_action(
|
||||||
elif exclude:
|
elif exclude:
|
||||||
excludeset = set(exclude)
|
excludeset = set(exclude)
|
||||||
field_names = field_names - excludeset
|
field_names = field_names - excludeset
|
||||||
response = HttpResponse(mimetype="text/csv")
|
response = HttpResponse(content_type="text/csv")
|
||||||
response["Content-Disposition"] = "attachment; filename=%s.csv" % unicode(opts).replace(".", "_")
|
response["Content-Disposition"] = "attachment; filename=%s.csv" % unicode(opts).replace(".", "_")
|
||||||
writer = csv.writer(response)
|
writer = csv.writer(response)
|
||||||
if header:
|
if header:
|
||||||
|
|
|
@ -78,7 +78,7 @@ def schedule_list_csv(request, slug=None):
|
||||||
presentations = Presentation.objects.filter(section=schedule.section)
|
presentations = Presentation.objects.filter(section=schedule.section)
|
||||||
presentations = presentations.exclude(cancelled=True).order_by("id")
|
presentations = presentations.exclude(cancelled=True).order_by("id")
|
||||||
|
|
||||||
response = HttpResponse(mimetype="text/csv")
|
response = HttpResponse(content_type="text/csv")
|
||||||
if slug:
|
if slug:
|
||||||
file_slug = slug
|
file_slug = slug
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue