Making a calculation in django based on the input from another model but experiencing errors
<p>I'm trying to subtract an amount from the fee that is in the Fees Model and a foreign key to Payment Model. I'm do the calculation below to automatically get the balance upon save but experiencing unsupported error. The return value from Fees Model is a total amount to be paid. Here's the error I'm getting:</p>

<blockquote>
  <p>unsupported operand type(s) for -: 'Fees' and 'int'</p>
</blockquote>

<pre><code>class Payment(models.Model):

    fee = models.ForeignKey(Fees)

    installment = models.CharField(
        _('Installment'),
        max_length=30,
        choices=INSTALLMENT_CHOICES,
        default=u' ',
        null=False,
        blank=False
    )

    amount = models.IntegerField(
        _('Amount'),
        null=False,
        blank=False
    )

     balance = models.IntegerField(
         _('Balance'),
         null=True,
         blank=True
     )

    def save(self, *args, **kwargs):
        self.balance = self.fee - self.amount
        return super(Payment, self).save(*args, **kwargs)
</code></pre>