开发者

Django many-to-many relationships: prevailing naming convention

开发者 https://www.devze.com 2023-03-18 06:51 出处:网络
I am hoping to hear from some people with experience developing Django sites as part of some sort of team.

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

精彩评论

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