I have this Model
summary = models.TextField()
But I want to have only 4 rows and 15 columns.
Also if I do that do I need to install database again or not.
I have this Model
summary = models.TextField()
But I want to have only 4 rows and 15 columns.
Also if I do that do I need to install database again or not.
Use Widget in Meta. Keep in Mind that you must add that field in modelform also
class MyModelForm(forms.ModelForm):
address = forms.CharField()
class Meta:
model = MyModel
exclude = ()
widgets = {
address': forms.Textarea(attrs={'rows':1, 'cols':15}),
}