I managed to override the look of a TextArea
Widget in the django admin interface with two different ways:
in
This is a browser-specific problem.
According to the thread Height of textarea does not match the rows in Firefox:
Firefox always adds an extra line after the textfield. If you want it to have a constant height, use CSS ...
You can set a style
attribute of the textarea:
from django.db import models
from django.forms import Textarea
class RulesAdmin(admin.ModelAdmin):
formfield_overrides = {
models.TextField: {'widget': Textarea(
attrs={'rows': 1,
'cols': 40,
'style': 'height: 1em;'})},
}
Works for me - tested on Firefox v. 23 and Chrome v. 29.
Hope that helps.