Update views.py

Fix views.py for compatibility with mg 0.6.0-dev as of 2013-10-08