def _get_field_by_name(model_class, field_name):
    """
    Compatible with old API of model_class._meta.get_field_by_name(field_name)
    """
    field = model_class._meta.get_field(field_name)
    return (field, field.model, not field.auto_created or field.concrete,
        field.many_to_many)
