Closed aguerradelgado closed 1 year ago
multiple ways that this can be done either with saving session information to database and making tbr a db view show * from book, join tbr on b_id where u_id = 'user id' (something like tbh my reasoning is a little wonky) with session objects above is session object pseudocode
this was completed using a session object for tbr cart, that was continuously appended to during the session based on the user
this is the basic code i found online about the shopping cart in session, but I dont really know how to connect it to the button click and where to place this code either in index
create session object for our cart
session['tbr'] = [] ...
Since a mutable data type (list) is being modified, this change
is not automatically detected by the session object
session['tbr'].append('whatever was clicked on the tbr button')
Therefore, mark the session object as modified
session.modified = True probably have this in a loop? i dont really know