Ticket #8778: validate-unique-field-labels.diff

File validate-unique-field-labels.diff, 854 bytes (added by Petr Marhoun <petr.marhoun@…>, 16 years ago)
  • django/forms/models.py

    === modified file 'django/forms/models.py'
     
    263263                    field_labels = [self.fields[field_name].label for field_name in unique_check]
    264264                    field_labels = get_text_list(field_labels, _('and'))
    265265                    form_errors.append(
    266                         _("%(model_name)s with this %(field_label)s already exists.") % \
    267                         {'model_name': model_name, 'field_label': field_labels}
     266                        _("%(model_name)s with this %(field_labels)s already exists.") % \
     267                        {'model_name': model_name, 'field_labels': field_labels}
    268268                    )
    269269               
    270270                # Remove the data from the cleaned_data dict since it was invalid
Back to Top