Reduce textareas height. Close #16

This commit is contained in:
Gabriel Augendre 2018-06-02 16:52:17 +02:00
parent 21e37ad5c2
commit ef734d7c23

View file

@ -15,6 +15,7 @@ class EditBookForm(forms.ModelForm):
super().__init__(*args, **kwargs)
self.fields['title'].widget = forms.TextInput()
self.fields['authors'].widget = forms.TextInput()
self.fields['comments'].widget.attrs.update(rows=3)
class AddBookForm(EditBookForm):
@ -28,7 +29,12 @@ class AddBookForm(EditBookForm):
class EditSuppliesForm(forms.ModelForm):
class Meta:
model = SuppliesRequirement
exclude = ['done']
fields = ['teacher', 'level', 'fields', 'supplies']
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['fields'].widget.attrs.update(rows=3)
self.fields['supplies'].widget.attrs.update(rows=3)
class AddSuppliesForm(EditSuppliesForm):