Ticket #7118: unique_together.patch
File unique_together.patch, 910 bytes (added by , 17 years ago) |
---|
-
django/db/models/manipulators.py
306 306 pass 307 307 else: 308 308 raise validators.ValidationError, _("%(object)s with this %(type)s already exists for the given %(field)s.") % \ 309 {'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'))}309 {'object': capfirst(opts.verbose_name), 'type': field_list[0].verbose_name.decode('utf8'), 'field': get_text_list([f.verbose_name for f in field_list[1:]], _('and'))} 310 310 311 311 def manipulator_validator_unique_for_date(from_field, date_field, opts, lookup_type, self, field_data, all_data): 312 312 from django.db.models.fields.related import ManyToOneRel