Python django.contrib.admin 模块,VERTICAL 实例源码

我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用django.contrib.admin.VERTICAL

项目:fluentcms-publishing    作者:bashu    | 项目源码 | 文件源码
def formfield_for_choice_field(self, db_field, request=None, **kwargs):
        """
        Get a form Field for a database Field that has declared choices.
        """
        # If the field is named as a radio_field, use a RadioSelect
        if db_field.name == 'redirect_type':
            kwargs['widget'] = AdminRadioSelect(attrs={'class': get_ul_class(admin.VERTICAL)})
        return db_field.formfield(**kwargs)