fixed diff codes at views.py