title: two button in a form to display a dictionary is not working
body: <p>I want to use two buttons in a template form and run two action in a function.
  when I omit if with only a button, django runs ,   but when I add if in the codes to execute 2 action , it stops working
  in view:
  def result(request):
  num1 = int(request.GET[&quot;num1&quot;])
  num2 = int(request.GET[&quot;num2&quot;])</p>
  <pre><code>if 'add' in request.POST:
      res = num1 + num2
  
  if 'sub' in request.POST:
      res = num1 - num2
  
  return render(request, 'home/result.html', {'result': res})
  </code></pre>
  <p>in template named clt</p>
  <pre><code>        &lt;form action=&quot;result&quot; &gt;
              Enter 1st number : &lt;input type=&quot;text&quot; name=&quot;num1&quot;&gt;&lt;br&gt;
              Enter 2st number : &lt;input type=&quot;text&quot; name=&quot;num2&quot;&gt;&lt;br&gt;
  
              &lt;button type=&quot;submit&quot; name=&quot;subscribe&quot;&gt;Subscribe&lt;/button&gt;
              &lt;button type=&quot;submit&quot; name=&quot;unsubscribe&quot;&gt;Unsubscribe&lt;/button&gt;
  
          &lt;/form&gt;
  </code></pre>
  <p>in template named result
   result   : 
   {{ result }}</p>