Get a field by name from a model class without messing with the app cache.

def get_field_from_model_by_name(model_class, field_name):
    """
    Get a field by name from a model class without messing with the app cache.
    """
    return first_match(lambda x: x if x.name == field_name else None, model_class._meta.fields)