Code

Ticket #8778: 00-unique-together-field-labels.diff

File 00-unique-together-field-labels.diff, 883 bytes (added by Petr Marhoun <petr.marhoun@…>, 6 years ago)
Line 
1=== modified file 'django/forms/models.py'
2--- django/forms/models.py      2008-09-01 22:47:46 +0000
3+++ django/forms/models.py      2008-09-02 08:10:52 +0000
4@@ -264,9 +264,9 @@
5                     field_labels = [self.fields[field_name].label for field_name in unique_check]
6                     field_labels = get_text_list(field_labels, _('and'))
7                     form_errors.append(
8-                        _(u"%(model_name)s with this %(field_label)s already exists.") % \
9+                        _(u"%(model_name)s with this %(field_labels)s already exists.") % \
10                         {'model_name': unicode(model_name),
11-                         'field_label': unicode(field_labels)}
12+                         'field_labels': unicode(field_labels)}
13                     )
14                 
15                 # Remove the data from the cleaned_data dict since it was invalid
16