Switched from functional to class-based generic views