How can I fill a table view based on some calculous, resorting to django?

So I’m starting a django web application and I’m new using django… So please be patient with me. So, in my project I have two views: 1- a user profile; 2- a sort of a calculator, that can give several results at the same time according to the user input

So, to start, here is my

class Calanalisis(models.Model):
sequence = models.CharField(max_length=120000)
gc_content = models.DecimalField(decimal_places=3, max_digits=1000)

def gc_content_cal(self):
    if self.sequence == True:
       gc_content= round((self.sequence.count('C') + 
       self.sequence.count('G'))/len(self.sequence) * 100,1)
       return gc_content

class AddSequenceForm(forms.ModelForm):
class Meta:
model = Calanalisis
fields = (‘sequence’,)

def calc_sequence(request):

    if request.method=='POST':
        if form.is_valid():
            profile.person_of = request.user
            return redirect('calc_sequence')

    context = {'form':form,'sequence_items':sequence_items,'myFilter':myFilter}
    return render(request, 'Add_Calc.html', context)

And now I want to introduce gc_content_cal to be calculated in the table. When I introduce the sequence, the sequence appears in the table, however the gc_content_cal continues to be 0,

Can someone help me please?

You are calculating a value for “gc_content” in gc_content_cal, but I don’t see anywhere in your code where you’re saving that value into the model’s gc_content field when you save that model.

Thanks for the input, but I figured what the problem was.