To change all the directory permission in the path /var/www/html/ use the below command
find /var/www/html/ -type d -exec chmod 755 {} \;
and for files
find /var/www/html/ -type f -exec chmod 644 {} \;
if request.method == 'POST':
srcfile = request.FILES.get("file", None)
reader = csv.DictReader(srcfile) # read rows into a dictionary format
for row in reader: print row