title: pass value from one class/function to another class/function
body: <p>I have written two class one for posting datas for payment and other one to show payment-successful message with <code>order_id</code>. I am sending order id from first function and i want to catch this id to show in my payment-successful template.</p>
  
  <pre><code>class ApiVIew(TemplateView):
      template_name = 'payment.html'
      def post(self,request):
          r = requests.post(url='www.randomsite.com',params = {'authToken':'12345','card_no':'1234','card_cvv':'****'})
          return HttpResponse(json.dumps({'response':r.json(),'status':'ok'}))
  </code></pre>
  
  <p>I call this class is ajax and parse there,so if r gives no error then i redirect(<code>window.location=localhost:8000/success</code>) to the <code>success-payment.html</code> page. so response gives me a json data:</p>
  
  <blockquote>
    <p>{'isSuccess': 1, 'order_id': 1cq2,}</p>
  </blockquote>
  
  <p>so i want to get this <code>order_id</code> and pass it to another function/class written below.</p>
  
  <pre><code>def payment_successfullView(request):
      return render(request,'payment-successfull.html')
  </code></pre>
  
  <p>How can i achieve so? Thanks in advance.</p>