Migrated function view to class based view for Django 1.5 compatible.