Fixed #2577 -- Made isSlug() validator translation-aware. Thanks for the patch, henrik_kroeger@arcor.de

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3634 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-08-21 17:43:34 +00:00
parent ff5e01db5d
commit cccbe23006
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ def isAlphaNumericURL(field_data, all_data):
def isSlug(field_data, all_data):
if not slug_re.search(field_data):
raise ValidationError, "This value must contain only letters, numbers, underscores or hyphens."
raise ValidationError, gettext("This value must contain only letters, numbers, underscores or hyphens.")
def isLowerCase(field_data, all_data):
if field_data.lower() != field_data: