I was required to store the data in session and retrieve it later on. My task is to select gifts and show the selected gift for confirmation on next page.
I followed the website here, but I don't understand what does this mean:
session['fred'] = 'yes'
Thank you, I'm a beginner in Python programming.
Sessions must be a dictionary where you store values as (key,value) pairs. So, in this case:
session['fred'] = 'yes'
'Fred' is the key and 'Yes' is the value.
Learn more about python dictionaries, here: https://www.tutorialspoint.com/python/python_dictionary.htm
session["abc"] = 123
print (session["abc"]) this will get you 123