title: Get the selected radio button in django template
body: <p>In my template I have for loop. As you can see the id for each radiobutton is represented by <code>{{stud.id}}</code> .</p>
  <p><code>{{stud.nameAndSurname}}</code> shows the name and the surname of the student(in browser I can see name and surname of the corresponding student).</p>
  <pre><code>&lt;form method=&quot;POST&quot; class=&quot;post-form&quot;&gt;
          {% csrf_token %}
          {% for stud in students %}
              &lt;input type=&quot;radio&quot; id=&quot;{{ stud.id }}&quot; name=&quot;student&quot;&gt;{{ stud.nameAndSurname  }}
          {% endfor %}
      &lt;button type=&quot;submit&quot; class=&quot;save btn btn-default&quot;&gt;GO!&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  <p>In my view.py I have:</p>
  <pre><code> class MyClass(View):
       def get(...):
           ...
  
       def post(self,request, pk):
           myVar = request.POST.get(&quot;student&quot;)
           return HttpResponse(myVar)
  </code></pre>
  <p>If I click submit button i want to go to another page that shows me name and surname of the selected student. Now the issue is that instead of the student's name and surname it's showing me simply written &quot;on&quot;</p>