docs: def get_all_related_objects(opts):
      """
      Django 1.8 changed meta api, see
      https://docs.djangoproject.com/en/1.8/ref/models/meta/#migrating-old-meta-api
      https://code.djangoproject.com/ticket/12663
      https://github.com/django/django/pull/3848
      Initially from Django REST Framework:
      https://github.com/tomchristie/django-rest-framework/blob/3.3.2/rest_framework/compat.py
      :param opts: Options instance
      :return: list of relations except many-to-many ones
      """
      if django.VERSION < (1, 8):
          return opts.get_all_related_objects()
      else:
          return [r for r in opts.related_objects if not r.field.many_to_many]