Fix views.py for compatibility with mg 0.6.0 as of 2014-03-05