original_docstring: Sort by the given list of fields.
  
      Each entry in the list is a 2-tuple: (fieldname, sort_order)
      eg - [(u'metadata_modified', u'desc'), (u'name', u'asc')]
      If fields is empty, then the default ordering is used.
      
docstring: Sort by the given list of fields.
docstring_tokens: Sort by the given list of fields .
code: def _sort_by(params_nosort, package_type, fields):
      """Sort by the given list of fields.
  
      Each entry in the list is a 2-tuple: (fieldname, sort_order)
      eg - [(u'metadata_modified', u'desc'), (u'name', u'asc')]
      If fields is empty, then the default ordering is used.
      """
      params = params_nosort[:]
  
      if fields:
          sort_string = u', '.join(u'%s %s' % f for f in fields)
          params.append((u'sort', sort_string))
      return search_url(params, package_type)
code_tokens: def _sort_by ( params_nosort , package_type , fields ) : params = params_nosort [ : ] if fields : sort_string = u', ' . join ( u'%s %s' % f for f in fields ) params . append ( ( u'sort' , sort_string ) ) return search_url ( params , package_type )
short_docstring: Sort by the given list of fields.
short_docstring_tokens: Sort by the given list of fields .
comment: """Sort by the given list of fields.
  
      Each entry in the list is a 2-tuple: (fieldname, sort_order)
      eg - [(u'metadata_modified', u'desc'), (u'name', u'asc')]
      If fields is empty, then the default ordering is used.
      """