Calling search and trying to pass into html template