I wrote a new handle_search view to go with the handle search form I added to the main page. It works fine for retrieving users it can find, but on a failed search, it simply returns to the home view.
We need to accomplish 2 things:
Write code to flash a "handle not found" message upon returning to the home page, if possible. This is the part I'm having trouble working out. What is the best way flash a message on the next-loaded view (the home view)? Currently I only know how to flash a message on the view I'm in. Is there a way to send a flash message or otherwise send error message text to the next view?
Write code to determine if the inputted handle can be found in the knowledge db. In this case, return to the home page with a failed search message, just like if a blank string was entered.
I wrote a new handle_search view to go with the handle search form I added to the main page. It works fine for retrieving users it can find, but on a failed search, it simply returns to the home view.
We need to accomplish 2 things: