擅长:python、mysql、java
<p>我还找到了这个解决方案,对我来说非常有效:</p>
<pre><code>class Test1(models.Model):
tests2 = models.ManyToManyField('Test2', blank=True)
class Test2(models.Model):
tests1 = models.ManyToManyField('Test1', through=Test1.tests2.through, blank=True)
</code></pre>