title: How do I pass a list from one view to another in Django?
body: <p>I've been scouring StackOverflow, but I haven't found an answer to this that works for me.  I am relatively new to Python and Django, so maybe I'm thinking about it wrong.</p>
  
  <p>To make a simple example, imagine two views with different associated URLs.  This is not supposed to be perfect code.  I'm just trying to figure out how to get a variable-length list of items from view 1 into view 2.  I don't see a way to do it via the URL because the list may be variably long.  Shouldn't this be extremely easy to do?</p>
  
  <pre><code>def view2(request, list_to_process):
  
       use list_to_process to manufacture formset (e.g. make a formset with one entry for each item in the list)
       return render(request, 'Project/template2.html', {'formset': formset})
  
  def view1(request):
  
      if request.method == "POST":
          if form.is_valid():
              result = form.cleaned_data
              list_to_process = []
              for item in result:
                  list_to_process.append(item)
              *WHAT CODE DO I USE HERE TO CALL VIEW2 AND SEND IT list_to_process AS AN ARGUMENT OR REQUEST ADDITION?*
      else:
          formset = formsettype()
          helper = AssayHelper() (defined elsewhere)
          helper.add_input(Submit("submit", "Submit")
          return render(request, 'Project/template1.html', {'formset': formset, 'helper': helper})
  </code></pre>
  
  <p>Can someone please help?  Thanks.</p>