def ajax_editable_boolean(attr, short_description):
 def _fn(self, item):
  return ajax_editable_boolean_cell(item, attr)
 _fn.short_description = short_description
 _fn.editable_boolean_field = attr
 return _fn

def ajax_editable_boolean ( attr , short_description ) : def _fn ( self , item ) : return ajax_editable_boolean_cell ( item , attr ) _fn . short_description = short_description _fn . editable_boolean_field = attr return _fn
convenience function: assign the return value of this method to a variable of your modeladmin class and put the variable name into list_display .