Ticket #3267: newforms_textfield_rendered_as_textarea.diff

File newforms_textfield_rendered_as_textarea.diff, 717 bytes (added by Philipp Keller <philipp.keller@…>, 18 years ago)

Exists only the "textfield rendered as textarea" part, forget the diff above

  • django/db/models/fields/__init__.py

     
    757757    def get_manipulator_field_objs(self):
    758758        return [oldforms.LargeTextField]
    759759
     760    def formfield(self, initial=None):
     761        from django.newforms import widgets
     762        return forms.CharField(required=not self.blank, widget=widgets.Textarea, label=capfirst(self.verbose_name), initial=initial)
     763   
     764
    760765class TimeField(Field):
    761766    empty_strings_allowed = False
    762767    def __init__(self, verbose_name=None, name=None, auto_now=False, auto_now_add=False, **kwargs):
Back to Top