updated views.py to display data from database on homepage in semi-working condition