Create a list of links in flask
Build a new route like '/profile' which takes a dynamic component like a username. So when a person clicks the name of the guest's username, the username is sent to the profile route. Now in the profile route function get the details of the guest from the database using the username from the route and pass the details of the guest to the guest.html and render the page. I hope this helps.
I'm creating a website using flask. One of the pages is a list of in-house guests populated from a linked database. I want the name of each guest to be a link that when clicked will redirect to a new page that has that guest's specific infromation. I can create a template called 'guest.html' as normal, but I'm struggling to figure out how to tell the new template which guest was selected.
How can I retain the information of which link was clicked if they all essentially lead to the same template?
I hope this isn't a silly question, I've looked for a while with no results.