def is_radio(value): if not isinstance(value, BoundField): return False return isinstance(value.field.widget, RadioSelect)