Flake8 touch ups of core/views.py