Answer the question
In order to leave comments, you need to log in
Is it possible to do feedback on ForeignKey models?
Help me understand
There are 2 models connected via ForeignKey
class Company(models.Model
..
class Man(models.Model):
company=models.ForeignKey('Company' ....)
Answer the question
In order to leave comments, you need to log in
Yes, you can
class Man(models.Model):
company=models.ForeignKey('Company', related_name='mans')
...
Company.objects.get(id=1).mans
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question