Update views.py

fix error code