Count how many form are submitted

In my model I have 5 questionnaire ( here I reported only two) I’d like to track how many of them are submitted, I’ve added a “quest__done” variable, but when I try to show it in my html It show just a blank space. How can I solve this? This is my code

**question.models.py**
from accounts.models import name

class QuestionOne(models.Model):
    question_1a = models.CharField(max_length=250, choices=point)
    question_2a = models.CharField(max_length=250, choices=point)
    question_3a = models.CharField(max_length=250, choices=point)
    id_code = models.CharField(max_length=250) 
 
    def __str__(self):
        return self.name + '_question_1'

class QuestionTwo(models.Model):
    question_1b = models.CharField(max_length=250, choices=point)
    question_2b = models.CharField(max_length=250, choices=point)
    question_3b = models.CharField(max_length=250, choices=point)
    id_code = models.CharField(max_length=250) 
 
    def __str__(self):
        return self.name + '_question_2'
**question.views.py**
def question_one(request):
   quest_done = 0
   if request.method == 'POST':
       form = QuestionOneForm(request.POST, request.FILES)
       if form.is_valid():
           quest_done += 1
           form.instance.user = request.user           
           form.save()
           return redirect('home')      
   else:
       form = QuestionOneForm()
   return render(request, 'quest.html', {'form': form, 'quest_done': quest_done})

def question_two(request):
   quest_done = 0
   if request.method == 'POST':
       form = QuestionTwoForm(request.POST, request.FILES)
       if form.is_valid():
           quest_done += 1
           form.instance.user = request.user           
           form.save()
           return redirect('home')      
   else:
       form = QuestionTwoForm()
   return render(request, 'quest.html', {'form': form, 'quest_done': quest_done})
*html**
<div class="row">
     <div class="col-sm-3">
      <h6 class="mb-0">Question form completed:</h6>
       </div>
       <div class="col-sm-9 text-secondary">
        {{ quest_done }} /5
        </div>
        </div>

Your quest_done variable is local to the view method. It’s not saved or passed between invocations.

You would need to persist that variable between views - either in the session or the database.

Thanks for your answer! could you help me with an exemple or redirect me somewhere were to find one? I’m having troube findind out what to do. Thanks again

For session information see the Sessions docs.