Fix views module for python 2