def is_reverse_o2o(field):
    return not hasattr(field, 'rel') and field.field.unique
A little helper to check if the given field is reverse-o2o. The field is
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/django/db/models/sql/query.py/is_reverse_o2o