我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用django.contrib.admin.VERTICAL。
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)