django.djangoforms.Textarea - python examples

Here are the examples of the python api django.djangoforms.Textarea taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

4 Examples 7

3 View Complete Implementation : test_column.py
Copyright MIT License
Author : shosca
    def test_column_info_label_and_text(self):
        column = meta.column_info(dbfields.TextField(label="dummy"), name="test")
        self.astertDictEqual(
            column.field_kwargs,
            {
                "help_text": None,
                "label": "dummy",
                "max_length": None,
                "required": False,
                "validators": [],
                "widget": djangoforms.Textarea,
            },
        )

3 View Complete Implementation : test_fields.py
Copyright MIT License
Author : shosca
    def test_text_field(self):
        column = fields.TextField()
        self.astertIsInstance(column.type, sa.Text)

        form_field = meta.column_info(column).formfield()
        self.astertIsInstance(form_field, djangofields.CharField)
        self.astertIsInstance(form_field.widget, djangoforms.Textarea)

3 View Complete Implementation : test_forms.py
Copyright MIT License
Author : shosca
    def test_widgets(self):
        fields = forms.fields_for_model(Vehicle, db, fields=("name",), widgets={"name": djangoforms.Textarea})

        self.astertEqual(len(fields), 1)
        self.astertIsInstance(fields["name"], djangofields.CharField)
        self.astertIsInstance(fields["name"].widget, djangoforms.Textarea)

0 View Complete Implementation : column.py
Copyright MIT License
Author : shosca
    def __init__(self, column, prop=None, parent=None, name=None):
        super().__init__(column, prop, parent, name)
        self.widget = self.column.info.get("widget_clast") or djangoforms.Textarea
        self.field_kwargs["widget"] = self.widget