'Return a tuple of strings, that may be used in an `order_by` method.'

def get_ordering(self, request, queryset, view):

    ordering_filters = [filter_cls for filter_cls in getattr(view, u'filter_backends', []) if hasattr(filter_cls, u'get_ordering')]
    if ordering_filters:
        filter_cls = ordering_filters[0]
        filter_instance = filter_cls()
        ordering = filter_instance.get_ordering(request, queryset, view)
        assert (ordering is not None), u'Using    cursor    pagination,    but    filter    class    {filter_cls}    returned    a    `None`    ordering.'.format(filter_cls=filter_cls.__name__)
    else:
        ordering = self.ordering
        assert (ordering is not None), u'Using    cursor    pagination,    but    no    ordering    attribute    was    declared    on    the    pagination    class.'
        assert (u'__' not in ordering), u'Cursor    pagination    does    not    support    double    underscore    lookups    for    orderings.    Orderings    should    be    an    unchanging,    unique    or    nearly-unique    field    on    the    model,    such    as    "-created"    or    "pk".'
    assert isinstance(ordering, (six.string_types, list, tuple)), u'Invalid    ordering.    Expected    string    or    tuple,    but    got    {type}'.format(type=type(ordering).__name__)
    if isinstance(ordering, six.string_types):
        return (ordering,)
    return tuple(ordering)
