web/formfields.py
branchstable
changeset 9278 a7894d5f00bb
parent 9213 312062f53981
child 9283 5f2c5eb1a820
equal deleted inserted replaced
9277:c964d8cf6efc 9278:a7894d5f00bb
   562         if self.max_length:
   562         if self.max_length:
   563             widget.attrs.setdefault('size', min(self.size, self.max_length))
   563             widget.attrs.setdefault('size', min(self.size, self.max_length))
   564             widget.attrs.setdefault('maxlength', self.max_length)
   564             widget.attrs.setdefault('maxlength', self.max_length)
   565 
   565 
   566     def init_text_area(self, widget):
   566     def init_text_area(self, widget):
   567         if self.max_length < 513:
   567         if self.max_length and self.max_length < 513:
   568             widget.attrs.setdefault('cols', 60)
   568             widget.attrs.setdefault('cols', 60)
   569             widget.attrs.setdefault('rows', 5)
   569             widget.attrs.setdefault('rows', 5)
   570 
   570 
   571 
   571 
   572 class PasswordField(StringField):
   572 class PasswordField(StringField):