Update views.py

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