Opened 8 years ago
Last modified 7 years ago
#29045 closed Bug
Multiple select widget does not honor size attribute — at Initial Version
| Reported by: | Jonah Bishop | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.admin | Version: | 1.11 |
| Severity: | Normal | Keywords: | |
| Cc: | elky | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
I have an admin page set up for a model like so:
@admin.register(p_models.ScheduleType)
class ScheduleTypeAdmin(admin.ModelAdmin):
formfield_overrides = {
models.ManyToManyField: {'widget': forms.SelectMultiple(attrs={'size': '30'})},
}
list_display = ('name',)
The resulting ManyToMany field has the size attribute set properly, but every browser I try only shows about 8 rows (not 30, as I instructed). I've cleared cache, and tried in multiple browsers (Chrome 63, Firefox 57). My site uses Django 1.11.9.
Note:
See TracTickets
for help on using tickets.