Update views.py

def note updated