擅长:python、mysql、java
<p>看看我的尝试:</p>
<p><a href="http://djangosnippets.org/snippets/2408/" rel="nofollow">http://djangosnippets.org/snippets/2408/</a></p>
<blockquote>
<p>An emulation of "table per hierarchy" a.k.a. "single table inheritance" in Django. The base class must hold all the fields. It's subclasses are not allowed to contain any additional fields and optimally they should be proxies.</p>
</blockquote>
<p>不完全是“单表继承”,但在很多情况下已经足够接近了。</p>