From e0cec60a143cedaf99c781bad284ec3d794a956b Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 24 Sep 2006 12:16:15 +0000 Subject: [PATCH] Fixed #2727 -- Fixed problem with serialising error messages from validation. Thanks, Ivan Saglaev. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3816 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/forms/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/forms/__init__.py b/django/forms/__init__.py index 537a109527..759a32ba81 100644 --- a/django/forms/__init__.py +++ b/django/forms/__init__.py @@ -2,7 +2,7 @@ from django.core import validators from django.core.exceptions import PermissionDenied from django.utils.html import escape from django.conf import settings -from django.utils.translation import gettext, gettext_lazy, ngettext +from django.utils.translation import gettext, ngettext FORM_FIELD_ID_PREFIX = 'id_' @@ -343,7 +343,7 @@ class FormField(object): def get_validation_errors(self, new_data): errors = {} if self.is_required and not new_data.get(self.field_name, False): - errors.setdefault(self.field_name, []).append(gettext_lazy('This field is required.')) + errors.setdefault(self.field_name, []).append(gettext('This field is required.')) return errors try: for validator in self.validator_list: