converted index view from function based view to class based view in views.py