Updated views.py - fixed bug