One approach is to put an object in a session in your first view, which can then be retrieved from request.session in the second view.
def first_view(request): my_thing = {'foo' : 'bar'} request.session['my_thing'] = my_thing return render(request, 'some_template.html') def second_view(request): my_thing = request.session.get('my_thing', None) return render(request, 'some_other_template.html', {'my_thing' : my_thing})
Brandon
source share