updated views.py to work for heroku with POSTGRES