summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-09-01 22:32:40 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-09-01 22:32:40 +0000
commitdcb0e8f959148331cde89def02ce28be3b248039 (patch)
treec09ebf39adccc08dc714b9014e46ac524ec6a4e1
parentfc4948d5747c9e64d0b51f481ebcb76f4c433deb (diff)
Fixup for Python 2.3.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8822 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/forms/models.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/django/forms/models.py b/django/forms/models.py
index bed76e9fd1..8e59ebecda 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -255,16 +255,18 @@ class BaseModelForm(BaseForm):
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