Changed some syntax in views.py to work