Updated example to use class-based generic views

Django dropped the function-based generic views in favor of class-based generic views. 
The transition is outlined here: https://docs.djangoproject.com/en/1.4/topics/generic-views-migration/