@classmethod
    def get_field_name(cls, field):
        for field_name, f in cls.fields.items():
            if f == field:
                return field_name
        raise AttributeError("Field %s does not exists in %s resource" % (
            field, cls))
Returns the field name for a given field.
dataset/ETHPy150Open django-import-export/django-import-export/import_export/resources.py/Resource.get_field_name