How do I call a model method into a view?
<p>I'm trying to get the difference between two dates in my model into my view to work with.</p>

<p>Model:</p>

<pre><code>class Proposal(models.Model):
    prop_num = models.IntegerField()
    start = models.DateField()
    end = models.DateField()
        ...
    def date_dif(self):
        return self.start-self.end
</code></pre>

<p>How do I get date_dif values in my view?</p>

<p>Views:</p>

<pre><code>def test(request):
    props = Proposal.objects.all()
    dates = ClosedDate.objects.all()
    for i in props:
        print(i.date_dif)

    context={
        "props":props,
        "dates":dates
    }

    return  render(request,"test.html",context)
</code></pre>