def get_field_type(f):
    """Returns a string representing the type of the given field.
    """
    field_type = f.__class__.__name__.lower().replace("field", "")
    if f.choices:
        field_type += "_choices"
    return field_type