Update views.py

fix key bug