Need help on checking/unchecking a checkbox based on passed in data

Hello, I am creating a website that a patient can manually insert their data and save into a database. Then, the data can be accessed and be modified like an “edit view”. I am using django.

I need help on displaying the saved data on the html.
I was able to figure out how to display the original data of the patient on the input that are text or integers. However, I can’t find a way to display the original data on the checkbox.

First, I will search the patient’s name
After searching the patient’s name
However, I would like the checkbox to be checked based on the data.

Could you help me on coding for the html?
users = patient’s data
form = form field to get an input

Any help will be greatly appreciated. Thank you in advance.
**** Need to modify {form.q1}} and {{form.q2}} to be checked or unchecked based on user.q1 and user.q2****
***user.q1 is MultipleChoiceField ***
***user.q2 is a true/false data ***


<h2>Patient Details</h2>
  <form method="POST">
  {% csrf_token %}

  {% for user in users%}
<div class="container">
  <form method="POST">
  {% csrf_token %}
    <th class="one"> Name: </th>
    <th class = "two">{{ user.patient_name}}</th>
    <th class="three">Birthdate </th>
    <th class = "four">{{ user.birthdate}}</th>
    <th class="one">Age</th>
    <th class = "two"><input type="integer" name = "age" id="age" value = {{user.age}}> </th>
    <th class = "three">Emotion </th>
    <th class = "four">{{ form.q1 }}</th> 
    <th class="one"> Do you sleep well? </th>
    <th class = "two">{{ form.q2}}</th>
{% endfor %}
  <button style = "border:0px; background-color:#4285F4; 
      height:40px; width:80px;margin-left:35%;" type = "submit" 
      value = "next"  >
{% endblock content%}

class Patient(models.Model):
	q1_choices = (('a1','Happy'),
	('a4', 'Tired'))

	#general info
	patient_name = models.CharField(max_length=20, )
	birthdate = models.DateField()
	age = models.PositiveSmallIntegerField(max_length=20)
	q1 = MultiSelectField(blank=True, choices = q1_choices)
	q2 = models.BooleanField( default =False,  blank=True)

	def __str__(self):
		return self.patient_name

class PatientModelForm(ModelForm):
  q1_choices = (('a1','Happy'),
  ('a4', 'Tired'))

  birthdate = forms.DateField(widget=SelectDateWidget(years=range(,
  q1 = forms.MultipleChoiceField(choices = q1_choices, required=False, widget=forms.CheckboxSelectMultiple())

  class Meta:
    model = Patient
    fields = '__all__'
    widgets = { 'q2': forms.CheckboxInput(attrs={'style':'width:30px;height:30px;'}), }

def modifyIntro(request):
	if request.method == 'POST':
		name = request.POST['name']
		bdate = request.POST['birthdate']
		if Patient.objects.filter(patient_name = name, birthdate = bdate):
			forms.change_id = Patient.objects.get(patient_name = name, birthdate = bdate).id
			return redirect('webapp-modifyInfo')
			messages.warning(request, f'No  patient exist. Please try again.')
	return render(request, 'webapp/about_patient.html')

def modifyInfo(request):
	q1_choices = (('a1','Happy'),
	('a4', 'Tired'))

	if request.method == 'POST':
		form = PatientModelForm(request.POST)

		if form.is_valid():
			# s =Patient.objects.filter(id = forms.change_id).update(sleep_id =
			return render(request, 'webapp/display_patient.html',{'users': Patient.objects.filter(id= forms.change_id)})
		form_modify =PatientModelForm		

	return render(request, 'webapp/modify_patient.html', { 'q1':q1_choices, 'users': Patient.objects.filter(id=forms.change_id), 'form': form_modify} )