Update views.py

Fixed the search results bug. Form referenced before assignment