Update views.py to not show DeprecationWarning in Django 1.6