code: def order_by(self, *orderings: str) -> "QuerySet":
          
          queryset = self._clone()
          new_ordering = []
          for ordering in orderings:
              order_type = Order.asc
              if ordering[0] == "-":
                  field_name = ordering[1:]
                  order_type = Order.desc
              else:
                  field_name = ordering
  
              if not (
                  field_name.split("__")[0] in self.model._meta.fields
                  or field_name in self._annotations
              ):
                  raise FieldError(
                      "Unknown field {} for model {}".format(field_name, self.model.__name__)
                  )
              new_ordering.append((field_name, order_type))
          queryset._orderings = new_ordering
          return queryset
docs: Accept args to filter by in format like this:
  
          .. code-block:: python3
  
              .order_by('name', '-tournament__name')
  
          Supports ordering by related models too.