def _get_field_handler(self, fieldname):
        """ Handle rendering of AJAX-editable fields for the changelist, by
            dynamically building a callable for each field.
        """

        def handler_function(obj, *args, **kwargs):
            ItemForm = modelform_factory(self.model, fields=(fieldname,))
            form = ItemForm(instance=obj, prefix="c" + unicode(obj.id))

            field_value = get_printable_field_value(obj, fieldname)

            # Render the field value and edit form
            return self.ajax_item_template.render(Context({
                'object_id': obj.id,
                'field_name': fieldname,
                'form': form.as_p(),
                'field_value': field_value
            }))

        handler_function.allow_tags = True
        handler_function.short_description = fieldname
        return handler_function