I have an random model:
class Model(models.Model):
other_field1 = models.SomeField(...)
m2m_field1 = models.ManyToManyField(...)
other_field2 = models.SomeField(...)
m2m_field2 = models.ManyToManyField(...)
other_field3 = models.SomeField(...)
I want to know the count of fields that correspond to the relation many to many and the count of other fields.
In the example above, I have 2 fields with a many-to-many relationship and 3 other fields.
EDIT
How to calculate the number of reverse relationships?
class OtherModel1(models.Model):
field = models.ForeginKey(Model)
class OtherModel2(models.Model):
field = models.ForeginKey(Model)