Django relations sqlite

in my models i have a problem. Using Types model i want to take the costs from Outgo. I cant do this other way, mayby you know how to take it and display in template?

class Types(models.Model):

    name = models.CharField(max_length=50, unique=True)

class Outgo(models.Model):
    name = models.CharField(max_length=50)
    cost= models.DecimalField(max_digits=9, decimal_places=3)
    date = models.DateField(default=datetime.date.today)
    types= models.ForeignKey(Types,null=True, blank=True)
Back to Top