#31220: Widgets ignores cols attribute
-----------------------------------------+-------------------------
Reporter: gurugeek | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 3.0
Severity: Normal | Keywords: widgets
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+-------------------------
I have tried two different packages and it appears that the cols attribute
for Widget doesn't recognise the "cols" attribute
example 1
{{{
class PostAdmin(admin.ModelAdmin):
formfield_overrides = {
models.TextField: {'widget': AdminMarkdownxWidget (attrs={'rows':
5, 'cols': 100, 'style': ' font-size: 1.5em; font-family:
HelveticaNeue;'})},
}
}}}
rows and style work fine, cols doesn't change the admin form
example 2
{{{
models.TextField: {'widget': AdminPagedownWidget(attrs={'rows':20,
'cols':200,
'style': ' font-size:
1.2em;'
})},
}}}
I also note that in the documentation
(https://docs.djangoproject.com/en/3.0/ref/forms/widgets/#textarea )
doesn't refer to the cols attribute so I wonder if it can still be changed
--
Ticket URL: <https://code.djangoproject.com/ticket/31220>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.b624552f06cbc0c8b953a591d41b7e58%40djangoproject.com.