Use proper locking, and other minor fixes.
[audio.git] / src / archive / views.py
index fc3a7e5..8621f64 100644 (file)
@@ -3,7 +3,7 @@
 from datetime import datetime
 import os
 import os.path
-from urllib import quote
+from urllib.parse import quote
 
 from archive import settings
 from django.contrib.auth import logout
@@ -198,7 +198,7 @@ def download(request, aid, which="source"):
     if not file_:
         raise Http404
     ext = file_.path.rsplit('.', 1)[-1]
-    response = HttpResponse(mimetype='application/force-download')
+    response = HttpResponse(content_type='application/force-download')
     
     response['Content-Disposition'] = "attachment; filename*=UTF-8''%s.%s" % (
         quote(audiobook.title.encode('utf-8'), safe=''), ext)