天天看點

django --fields.E304 錯誤解決方案

今天在同一個表裡,有多個不同的使用者集時出現。

fields.E304: Field name <code>&lt;field name&gt;</code> clashes with accessor for <code>&lt;fieldname&gt;</code>.

網上解決方案,增加不同的related_name解決。

http://blog.csdn.net/meylovezn/article/details/46924893

<code>related_name</code> will be a unique column in db table, so a model cannot have two or more outgoing relations with the same name.