开发者

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

开发者 https://www.devze.com 2022-12-20 11:25 出处:网络
In Django admin, how can I increase the width of the ManyToMany field开发者_如何学C\'s widget when using filter_horizontal?You could apply custom classes to the fields using ModelAdmin Fieldsets you w

In Django admin, how can I increase the width of the ManyToMany field开发者_如何学C's widget when using filter_horizontal?


You could apply custom classes to the fields using ModelAdmin Fieldsets you wanted to change and add an extra stylesheet with:

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

Otherwise you'll have to write your own admin templates or widgets.

0

精彩评论

暂无评论...
验证码 换一张
取 消