Fixed #1477 -- Made maxlength overridablef for URLField formfield

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2874 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-05-09 16:04:03 +00:00
parent 05fd735afe
commit 0627ad320c
1 changed files with 2 additions and 2 deletions

View File

@ -836,9 +836,9 @@ class EmailField(TextField):
class URLField(TextField): class URLField(TextField):
"A convenience FormField for validating URLs" "A convenience FormField for validating URLs"
def __init__(self, field_name, length=50, is_required=False, validator_list=[]): def __init__(self, field_name, length=50, maxlength=200, is_required=False, validator_list=[]):
validator_list = [self.isValidURL] + validator_list validator_list = [self.isValidURL] + validator_list
TextField.__init__(self, field_name, length=length, maxlength=200, TextField.__init__(self, field_name, length=length, maxlength=maxlength,
is_required=is_required, validator_list=validator_list) is_required=is_required, validator_list=validator_list)
def isValidURL(self, field_data, all_data): def isValidURL(self, field_data, all_data):