store session in database django code example
Example 1: how store list in django session
if not 'saved' in request.session or not request.session['saved']:
request.session['saved'] = [obj]
else:
saved_list = request.session['saved']
saved_list.append(obj)
request.session['saved'] = saved_list
Example 2: django set session variable
request.session['idempresa'] = idempresaValue