On Fri, Oct 23, 2015 at 3:27 PM, Gagaro <
gaga...@gmail.com> wrote:
> However, I still have a question. The reverse relation is wishlist_set by
> default. Why is Django bothered if the attribute is name wishlist (I would
> understand if I named my attribute wishlist_set)?
The message doesn't mention the reverse relation names that conflict,
it mentions the names of *fields* whose relation names would conflict.
> Reverse query name for 'Wishlist.user' clashes with field name 'User.wishlist'.
> HINT: Rename field 'User.wishlist', or add/change a related_name argument to the definition for field 'Wishlist.user'.
'Wishlist.user' and 'User.wishlist' are the names of the fields being
discussed. The meaning might be clearer with some added words:
The reverse query name for the field 'Wishlist.user' clashes with
the field 'User.wishlist' - they are both ''wishlist_set'.
HINT: Rename field 'User.wishlist', or add/change a related_name
argument to the definition for field 'Wishlist.user'.
Cheers
Tom