#NEWLINE# def show_section( section_pk ) : #NEWLINE# #INDENT# section = Section . objects . get ( pk = section_pk ) #NEWLINE# print ( section . title ) #NEWLINE# print ( section . url ) #NEWLINE# print ( section . word_count ) #NEWLINE# print ( section . pk ) #NEWLINE# count = 0 #NEWLINE# for code_reference in section . code_references . all ( ) : #NEWLINE# #INDENT# link = code_reference . first_link ( ) #NEWLINE# if ( link is not None ) : #NEWLINE# #INDENT# count += 1 #NEWLINE# link_str = link . code_element . human_string ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# link_str = '' #NEWLINE# #UNINDENT# print ( '{0};;{1}' . format ( code_reference . content , code_reference ) ) #NEWLINE# #UNINDENT# print ( 'Total links: {0}' . format ( count ) )