      # this internal API across Django 1.7 -> Django 1.8.
      # See: https://code.djangoproject.com/ticket/24208
  
      reverse_relations = OrderedDict()
      for relation in opts.get_all_related_objects():
          accessor_name = relation.get_accessor_name()
          related = getattr(relation, 'related_model', relation.model)
          reverse_relations[accessor_name] = RelationInfo(
              model_field=None,
              related_model=related,
 
</s> remove     for relation in opts.get_all_related_many_to_many_objects():
 </s> add     for relation in get_all_related_many_to_many_objects(opts):
    for relation in get_all_related_objects(opts):
      # this internal API across Django 1.7 -> Django 1.8.
      # See: https://code.djangoproject.com/ticket/24208
  
      reverse_relations = OrderedDict()
    for relation in get_all_related_objects(opts):
          accessor_name = relation.get_accessor_name()
          related = getattr(relation, 'related_model', relation.model)
          reverse_relations[accessor_name] = RelationInfo(
              model_field=None,
              related_model=related,
keep keep keep keep replace keep keep keep keep keep
 Use related_objects api for Django 1.9+ 
rest_framework/utils/model_meta.py