I am reading csv file through upload and trying to store all values in a list
def upload(request):
paramFile = request.FILES[\'file\'].read()
data =
in Python 3, to get the correct type (String not bytes) without reading the full file into memory you can use a generator to decode line by line:
def decode_utf8(input_iterator):
for l in input_iterator:
yield l.decode('utf-8')
def upload(request):
reader = csv.DictReader(decode_utf8(request.FILES['file']))
for row in reader:
print(row)