Author: mtredinnick
Date: 2008-09-01 17:32:40 -0500 (Mon, 01 Sep 2008)
New Revision: 8822
Modified:
django/trunk/django/forms/models.py
Log:
Fixup for Python 2.3.
Modified: django/trunk/django/forms/models.py
===================================================================
--- django/trunk/django/forms/models.py 2008-09-01 22:28:18 UTC (rev 8821)
+++ django/trunk/django/forms/models.py 2008-09-01 22:32:40 UTC (rev 8822)
@@ -255,16 +255,18 @@
field_label = self.fields[field_name].label
# Insert the error into the error dict, very sneaky
self._errors[field_name] = ErrorList([
- _("%(model_name)s with this %(field_label)s already
exists.") % \
- {'model_name': model_name, 'field_label': field_label}
+ _(u"%(model_name)s with this %(field_label)s already
exists.") % \
+ {'model_name': unicode(model_name),
+ 'field_label': unicode(field_label)}
])
# unique_together
else:
field_labels = [self.fields[field_name].label for
field_name in unique_check]
field_labels = get_text_list(field_labels, _('and'))
form_errors.append(
- _("%(model_name)s with this %(field_label)s already
exists.") % \
- {'model_name': model_name, 'field_label': field_labels}
+ _(u"%(model_name)s with this %(field_label)s already
exists.") % \
+ {'model_name': unicode(model_name),
+ 'field_label': unicode(field_labels)}
)
# Remove the data from the cleaned_data dict since it was
invalid
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---