Fixed #734 -- Fixed namespace bug in validators.isValidIPAddress4. Thanks, Hugo and mflanagan

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2005-11-05 17:59:16 +00:00
parent e859854d0a
commit 8ee33da585
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ def isValidIPAddress4(field_data, all_data):
valid_parts = [el for el in field_data.split('.') if 0 <= int(el) <= 255] valid_parts = [el for el in field_data.split('.') if 0 <= int(el) <= 255]
if len(valid_parts) == 4: if len(valid_parts) == 4:
return return
raise validators.ValidationError, _("Please enter a valid IP address.") raise ValidationError, _("Please enter a valid IP address.")
def isNotEmpty(field_data, all_data): def isNotEmpty(field_data, all_data):
if field_data.strip() == '': if field_data.strip() == '':