Update views.py

bug fix