Flask i cant get it to only show the user data insted of all data

can someone tell me where i have gone wrong please all i wanna do is have it so the user only sees their order not everyone sees everyones order thanks

It has been a good while since I worked with Flask, so forgive me if this is complete nonsense :smiley:

From what I am seeing you are retrieving all the orders with:


Normally you would use a filter to only retrieve those that you want, like:

Orders.query.filter_by(username = "username")

I tryed that it still dident work but thank you for trying