title: How to parse json payload in html form formate to an api in django and perform calculation
body: <p>I want to parse the The parameters below to an endpoint for payment and upon a successful payment, the amount added to a a model field in my database. Parameters are " merchant_id, transaction_id, amount, API_Key, apiuser, email, redirect_url "      and the api " <a href="https://test.theteller.net" rel="nofollow noreferrer">https://test.theteller.net</a> "</p>
  
  <p>I have a model that i want the amount enter by a user to be save to the vote filed upon successful payment.</p>
  
  <p>model.py </p>
  
  <pre><code>class Category(models.Model):
    Award = models.ForeignKey(Award, on_delete=models.CASCADE)
    category = models.CharField(max_length=100,)
    slug = models.SlugField(max_length=150)
    date = models.DateTimeField(auto_now_add=True)
  
    def __str__(self):
        return self.category
  
  
  
  class Nomination(models.Model):
    Fullname = models.CharField(max_length=120)
    Nominee_ID = models.CharField(max_length=100)
    Category = models.ForeignKey(Category, on_delete=models.CASCADE)
    image = models.ImageField(upload_to='nominations_images')
    slug = models.SlugField(max_length=150)
    votes = models.IntegerField(default=0)
    date = models.DateTimeField(auto_now_add=True)
  
  
  
    def __str__(self):
         return self.Fullname
  </code></pre>
  
  <p>View.py</p>
  
  <pre><code>     class NominationView(ListView):
         model = Category
         template_name = 'nomination.html'
  
  
     class NominationPayView(DetailView):
        model = Nomination
        template_name = 'Payment.html'
  </code></pre>
  
  <p>Payment.html</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;form action="https://test.theteller.net " method="post"&gt;
    &lt;input type="text" name="merchant_id" id="merchant_id" value=""&gt;
    &lt;input type="text" name="transaction_id" id="transaction_id" value="{{nomination.Nominee_ID }}" &gt;
    ...
    &lt;button type="submit" &gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>AM processing the form on the detailView because i want the amount saved to the element being viewed.</p>
  
  <ol>
  <li>I would like to pass the parameters to the API endpoint successfully.</li>
  <li>Then save the amount to vote field in the nomination upon success response from the API. Any help.</li>
  </ol>