Fetch data from manytomany relationship along with onetomany

Published: 25/09/2018
Fetch data from manytomany relationship along with onetomany
Source: STACKOVERFLOW.COM

If we consider the three following models: clients, companies, contacts. Clients can purchase goods from several companies and a company has many clients. Moreover, a company has several "contact" types (email, fax, phone,...). class Clients(models.Model): fname= models.CharField(max_length=45, null=False) company= models.ManyToManyField(to='Companies', related_name='provider', blank=True) c

Read more
Related news
Comment
FACEBOOK