title: Passing Context From One Django View To Another
body: <p>I have a Django view with a membership form that redirects to a thank you page.  The form is integrated with Stripe for payments.  The form works as expected; charging via Stripe and redirecting to a thank you page.  I would like pass the context variables to be displayed on the thank you page. I read Django Sessions can do this, but I can't figure it out.  Below are my application and thank you page views.  Thank you for your help.</p>
  
  <pre><code>def membership_application(request):
      # TODO - add method to check if id exists before posting
      # TODO - setup proper form validation
      # TODO - Setup billing
      if request.method == 'POST':
          form = MembershipForm(data=request.POST)
          if form.is_valid():
              stripe.api_key = settings.STRIPE_SECRET_KEY
              name = request.POST.get('name', '')
              address = request.POST.get('address', '')
              city = request.POST.get('city', '')
              state = request.POST.get('state', '')
              zip = request.POST.get('zip', '')
              phone_number = request.POST.get('phone_number', '')
              membership = request.POST.get('membership', '')
              support = request.POST.get('support', '')
              agree = request.POST.get('agree', '')
              email_address = request.POST.get('email_address', '')
              number = request.POST.get('number', '')
              cvc = request.POST.get('cvc', '')
              exp = request.POST.get('exp', '')
              # token = form.cleaned_data['stripe_token'],
              # exp_m = int(request.POST.get('exp_month', ''))
              # exp_y = int(request.POST.get('exp_year', ''))
  
              exp_month = exp[0:2]
              exp_year = exp[5:9]
  
              subject = 'New Plaque Order'
              from_email = settings.DEFAULT_FROM_EMAIL
              recipient_list = [from_email]
  
              token = stripe.Token.create(
                  card={
                      'number': number,
                      'exp_month': exp_month,
                      'exp_year': exp_year,
                      'cvc': cvc
                  },
              )
  
              customer = stripe.Customer.create(
                  email=email_address,
                  source=token,
              )
  
              membership = stripe.Subscription.create(
                  customer=customer.id,
                  plan=membership,
              )
  
              total_charge = int(membership.plan.amount) + int(support)
  
              # Charge the user's card:
              charge = stripe.Charge.create(
                  amount=total_charge,
                  currency='usd',
                  description='Soledad Memorial Membership Signup',
                  customer=customer.id
              )
  
              # f_charge = Money(charge.amount, 'USD')  # Money(retrieved_charge.charge.amount, 'USD')
  
              ctx = {
                  'title': 'Membership Application',
                  'name': name,
                  'address': address,
                  'city': city,
                  'state': state,
                  'zip': zip,
                  'phone_number': phone_number,
                  'email_address': email_address,
                  'number': number,
                  'cvc': cvc,
                  'charge': charge,
                  'customer': customer,
                  'membership': membership,
                  'support': support,
                  'agree': agree,
              }
  
              message = get_template('email_forms/membership_form_email.html').render(Context(ctx))
              msg = EmailMessage(subject, message, from_email=from_email, to=recipient_list)
              msg.content_subtype = 'html'
              msg.send(fail_silently=True)
  
              return redirect('/contribute/thank-you/', ctx)
  
      return render(request, 'contribute/_membership-application.html')
  
  
  def membership_thank_you(request):
      ctx = {
          'title': 'Thank You'
      }
      return render(request, 'contribute/_membership-thank-you.html', ctx)
  </code></pre>