summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/forms/models.py b/django/forms/models.py
index d72c62f7f0..0684199db5 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -1032,7 +1032,8 @@ def _get_foreign_key(parent_model, model, fk_name=None, can_fail=False):
)
else:
raise ValueError(
- "'%s' has more than one ForeignKey to '%s'." % (
+ "'%s' has more than one ForeignKey to '%s'. You must specify "
+ "a 'fk_name' attribute." % (
model._meta.label,
parent_model._meta.label,
)