Django Book 翻译
菜单>:
TOC
返回
原文:
You can override the ``FOO_set`` name by setting the ``related_name`` parameter in the ``ForeignKey()`` definition. For example, if the ``Entry`` model was altered to ``blog = ForeignKey(Blog, related_name='entries')`` , the preceding example code would look like this:
翻译:
通过在"ForeignKey()"中定义related_name参数,你可以重载"FOO_set"名字.举例,如果把"Entry"模型修改为"blog =ForeignKey(Blog, related_name='entries')",处理例子的代码如下:
备注:
译者: