Ticket #7118: unique_together.patch

File unique_together.patch, 910 bytes (added by paradise.qingfeng@…, 17 years ago)

unique Unicode

  • django/db/models/manipulators.py

     
    306306        pass
    307307    else:
    308308        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'))}
    310310
    311311def manipulator_validator_unique_for_date(from_field, date_field, opts, lookup_type, self, field_data, all_data):
    312312    from django.db.models.fields.related import ManyToOneRel
Back to Top