Answer the question
In order to leave comments, you need to log in
Dependent values in Django form?
models.py
class Company(models.Model):
name = models.CharField(max_length=64, verbose_name=u'Название компании')
....
class Document(models.Model):
number = models.CharField(max_length=64, verbose_name=u'Номер документа')
company = models.ForeignKey(Company)
...
class Commission(models.Model):
name = models.CharField(max_length=64, verbose_name=u'Название комиссии')
....
class CompanyCommission(models.Model):
company = models.ForeignKey(Company)
commission = models.ForeignKey(Commission)
document = models.ForeignKey(Document)
....
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question