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/
Merge pull request #355 from AMeng/patch-1

Updated example to use class-based generic views