开发者

Django many-to-many relationships: prevailing naming convention

I am hoping to hear from some people with experience developing Django sites as part of some sort of team.

What is the naming convention most commonly seen for many-to-many relationships? Do most people stick with the entry_set default, or is it more common and easier to use a more 开发者_C百科symmetrical related_name='entries' approach?


The _set suffix indicates that the attribute is a manager rather than a model, and should be retained in order to minimize confusion.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜