Python django.forms.widgets 模块,RadioChoiceInput() 实例源码

我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用django.forms.widgets.RadioChoiceInput()

项目:deb-python-jingo    作者:openstack    | 项目源码 | 文件源码
def patch():
    from django.forms import forms, formsets, util, widgets

    # Add __html__ methods to these classes:
    classes = [
        forms.BaseForm,
        forms.BoundField,
        formsets.BaseFormSet,
        util.ErrorDict,
        util.ErrorList,
        widgets.Media,
        widgets.RadioFieldRenderer,
    ]
    try:
        classes.append(widgets.RadioChoiceInput)
    except AttributeError:
        classes.append(widgets.RadioInput)

    for cls in classes:
        if not hasattr(cls, '__html__'):
            cls.__html__ = __html__