response = HttpResponse(content_type = mimetype, status=206)
response['Content-Disposition'] = "attachment; filename=%s" % \
(fileModel.FileName)
response['Accept-Ranges'] = 'bytes'
response['X-Accel-Redirect'] = settings.MEDIA_URL + '/' + fileModel.FileData.MD5
response['X-Accel-Buffering'] = 'no'
return response
This worked out for me. Now authentication with django + streaming with nginx is accomplished.