Skip to content
Browse files

Fixed #2194 -- Tweaked error message for unique_together validator to…

… display

all verbose field names. Patch from

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent e149c8b commit 5371ee1743dcfc6322dafeb292618c0405c00510 @malcolmt malcolmt committed
Showing with 2 additions and 1 deletion.
  1. +1 −0 AUTHORS
  2. +1 −1 django/db/models/
@@ -64,6 +64,7 @@ answer newbie questions, and generally made Django that much better:
Ian Clelland <>
Matt Croydon <>
Jonathan Daugherty (cygnus) <>
Jason Davies (Esaj) <>
Alex Dedul
2 django/db/models/
@@ -300,7 +300,7 @@ def manipulator_validator_unique_together(field_name_list, opts, self, field_dat
raise validators.ValidationError, _("%(object)s with this %(type)s already exists for the given %(field)s.") % \
- {'object': capfirst(opts.verbose_name), 'type': field_list[0].verbose_name, 'field': get_text_list(field_name_list[1:], 'and')}
+ {'object': capfirst(opts.verbose_name), 'type': field_list[0].verbose_name, 'field': get_text_list([f.verbose_name for f in field_list[1:]], 'and')}
def manipulator_validator_unique_for_date(from_field, date_field, opts, lookup_type, self, field_data, all_data):
from django.db.models.fields.related import ManyToOneRel

0 comments on commit 5371ee1

Please sign in to comment.
Something went wrong with that request. Please try again.