我有两个模型:
class Income(models.Model):
id = models.AutoField('ID', primary_key=True)
date = models.DateField('Date', blank=True, null=True)
user = models.ForeignKey(User, null=True, help_text="User Income")
class Invoice(models.Model):
id = models.AutoField('ID', primary_key=True)
income = models.ForeignKey(Income, null=True, blank=True, related_name='Income')
user = models.ForeignKey(User, null=True, blank=True, related_name='User_Invoice')
我需要获取与任何“发票”无关的“收入”。我没有办法看到这个问题。非常感谢 :)