def _get_field(model, name):
    if VERSION < (1, 8):
        return model._meta.get_field_by_name(name)[0]
    else:
        return model._meta.get_field(name)
dataset/ETHPy150Open alex/django-taggit/taggit/utils.py/_get_field/original