Update views.py

added some logging statements