def set_sort(self, request):
<EOL>sort_request = request.GET.get(self.sort_parameter, self.default_sort)<EOL>if sort_request.startswith('<STR_LIT:->'):<EOL><INDENT>sort_order = '<STR_LIT:->'<EOL>sort_field = sort_request.split('<STR_LIT:->')[<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>sort_order = '<STR_LIT>'<EOL>sort_field = sort_request<EOL><DEDENT>if not sort_field in self._allowed_sort_fields:<EOL><INDENT>sort_order = self.default_sort_order<EOL>sort_field = self.default_sort_field<EOL><DEDENT>return (sort_order, sort_field)<EOL>
Take the sort parameter from the get parameters and split it into
the field and the prefix