code: def has_custom_queryset(manager):
      "Check whether manager (or its parents) has declared some custom get_queryset method."
      old_diff = getattr(manager, 'get_query_set', None) != getattr(Manager, 'get_query_set', None)
      new_diff = getattr(manager, 'get_queryset', None) != getattr(Manager, 'get_queryset', None)
      return old_diff or new_diff has_custom_queryset(manager):
      "Check whether manager (or its parents) has declared some custom get_queryset method."
      old_diff = getattr(manager, 'get_query_set', None) != getattr(Manager, 'get_query_set', None)
      new_diff = getattr(manager, 'get_queryset', None) != getattr(Manager, 'get_queryset', None)
      return old_diff or new_diff
docs: Check whether manager (or its parents) has declared some custom get_queryset method.