Update views.py

file.name.split('.') cause an error when file.name contains more than one dot like "2013.01.01.picname.jpg"