擅长:python、mysql、java
<p>就像mgilson说的,这是自上而下的。但是Django有办法克服它-</p>
<pre><code>pal = models.ManyToManyField('PS', blank=True, null=True)
</code></pre>
<p>Django doc在ForeignKey下描述了它。在</p>
<blockquote>
<p>If you need to create a relationship on a model that has not yet been defined, you can use the name of the model, rather than the model object itself.</p>
</blockquote>
<p>你可以<a href="https://docs.djangoproject.com/en/dev/ref/models/fields/#foreignkey" rel="noreferrer">read more here</a>。在</p>