In a Django admin, how do I increase the widget width of a ManyToMany field when using filter_horizontal?

In Django admin, how do I increase the width of the ManyToMany field widget when using filter_horizontal?

+6
django django-admin
source share
1 answer

You can apply custom classes to fields using the ModelAdmin Fieldsets you would like to modify and add an additional stylesheet using

class MyAdmin(admin.ModelAdmin): class Media: css = { "all": ("my_styles.css",) } 

Otherwise, you will have to write your own admin templates or widgets.

+4
source share

All Articles