django 1.5 compat

django 1.5 removes all function-based generic views from django, so just converts this to use the equivalent class-based view per django's porting guide.