get value of radio button

Hi
I have a form in template and there are 3 options. I need to get the selected item from that list. how to do that?

<form method = "POST">
{% csrf_token %}
<div class="form-check">
	<input class="form-check-input" type="radio" name="inlineRadioOptions" id="username1" value={{user1}}>
	<label class="form-check-label" for="inlineRadio1">{{user1}} - {{total_price1}}AED</label>
</div>
<div class="form-check">
        <input class="form-check-input" type="radio" name="inlineRadioOptions" id="username2" value={{user2}}>
	<label class="form-check-label" for="inlineRadio1">{{user2}} - {{total_price2}}AED </label>
</div>
<div class="form-check">
	<input class="form-check-input" type="radio" name="inlineRadioOptions" id="username3" value={{user3}}>
	<label class="form-check-label" for="inlineRadio1">{{user3}} - {{total_price3}}AED </label>
</div>
<br/>
	<button type="submit" class="btn btn-primary">Submit</button>
</form>
``
Thanks`

Can you please clarify a bit more?

in my view.py i need to get the value of the selected radeo button

if request.method == "POST":
# i need to get the valiue of the selected radeo button from the form

Hey there!
Did you already covered this part of the documentation?

Checkout the @leandrodesouzadev 's mentioned link. It covers this topic.

Example code to get post data from the same:

from django.http import HttpResponseRedirect
from django.shortcuts import render

from .forms import NameForm

def get_name(request):
    # if this is a POST request we need to process the form data
    if request.method == 'POST':
        # create a form instance and populate it with data from the request:
        form = NameForm(request.POST)
        # check whether it's valid:
        if form.is_valid():
            # process the data in form.cleaned_data as required
            # ...
            # redirect to a new URL:
            return HttpResponseRedirect('/thanks/')

    # if a GET (or any other method) we'll create a blank form
    else:
        form = NameForm()

    return render(request, 'name.html', {'form': form})