class Match models Model who models ForeignKey User related_name math_

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
class Match(models.Model):
who = models.ForeignKey(User, related_name="math_who") # кто хочет
whom = models.ForeignKey(User, related_name="math_whom") # кого хочет
matching = models.NullBooleanField(default=None, blank=True) # совпадение
counter = models.IntegerField(default=settigs.MATCH_NUM_CHANCES) # счётчик
group = ForeignKey(Group, related_name="math_group", null=True, blank=True) # группа
created = models.DateTimeField(auto_now_add=True)