The order view needs to give out only the orders of the current session
(The view is called index in the orders app
This means you need to take the orders from the session. It is a list (parsed in string because of session format) that contains the order id.
So you have to convert those ids to the actual Order objects using .objects.get() method. and send them to the template using this context structure: context = { "orders": <CURRENT_SESSION_ORDERS> }
The order view needs to give out only the orders of the current session
(The view is called
index
in the orders appThis means you need to take the
orders
from the session. It is a list (parsed in string because of session format) that contains the order id.So you have to convert those ids to the actual Order objects using
.objects.get()
method. and send them to the template using this context structure:context = { "orders": <CURRENT_SESSION_ORDERS> }