def get_thread_list_url(request, course_key, topic_id_list=None, following=False):
 path = reverse('thread-list')
 query_list = (([('course_id', unicode(course_key))] + [('topic_id', topic_id) for topic_id in (topic_id_list or [])]) + ([('following', following)] if following else []))
 return request.build_absolute_uri(urlunparse(('', '', path, '', urlencode(query_list), '')))

def get_thread_list_url ( request , course_key , topic_id_list = None , following = False ) : path = reverse ( 'thread-list' ) query_list = ( ( [ ( 'course_id' , unicode ( course_key ) ) ] + [ ( 'topic_id' , topic_id ) for topic_id in ( topic_id_list or [ ] ) ] ) + ( [ ( 'following' , following ) ] if following else [ ] ) ) return request . build_absolute_uri ( urlunparse ( ( '' , '' , path , '' , urlencode ( query_list ) , '' ) ) )
returns the url for the thread_list_url field .