related_name 関連の多くの問題で失敗します。もちろん、実際の開発サーバーを (で./manage.py runserver
) 実行している場合、これは起こりません。モデルが 2 回生成されているのではないでしょうか? 私はpsycopg2 2.4.1を実行しています。これが私のテスト出力です:
(venv)lacrymology@Roller:boilerplate$ ./manage.py test
Creating test database for alias 'default'...
Error: One or more models did not validate:
l10n.address: Accessor for field 'user_shipping' clashes with related field 'User.shipping_address'. Add a related_name argument to the definition for 'user_shipping'.
l10n.address: Reverse query name for field 'user_shipping' clashes with related field 'User.shipping_address'. Add a related_name argument to the definition for 'user_shipping'.
l10n.address: Accessor for field 'user_billing' clashes with related field 'User.billing_address'. Add a related_name argument to the definition for 'user_billing'.
l10n.address: Reverse query name for field 'user_billing' clashes with related field 'User.billing_address'. Add a related_name argument to the definition for 'user_billing'.
custom_registration.profile: Accessor for field 'user' clashes with related field 'User.profile'. Add a related_name argument to the definition for 'user'.
custom_registration.profile: Reverse query name for field 'user' clashes with related field 'User.profile'. Add a related_name argument to the definition for 'user'.
addressmodel.address: Accessor for field 'user_shipping' clashes with related field 'User.shipping_address'. Add a related_name argument to the definition for 'user_shipping'.
addressmodel.address: Reverse query name for field 'user_shipping' clashes with related field 'User.shipping_address'. Add a related_name argument to the definition for 'user_shipping'.
addressmodel.address: Accessor for field 'user_billing' clashes with related field 'User.billing_address'. Add a related_name argument to the definition for 'user_billing'.
addressmodel.address: Reverse query name for field 'user_billing' clashes with related field 'User.billing_address'. Add a related_name argument to the definition for 'user_billing'.
profiles.profile: Accessor for field 'user' clashes with related field 'User.profile'. Add a related_name argument to the definition for 'user'.
profiles.profile: Reverse query name for field 'user' clashes with related field 'User.profile'. Add a related_name argument to the definition for 'user'.