formatting fixes to views.py