Update views.py

added object gathering and removed unused dictionary from index.