#NEWLINE# def get_nodes( self , request ) : #NEWLINE# #INDENT# nodes = [ ] #NEWLINE# for cat in Category . objects . all ( ) : #NEWLINE# #INDENT# n = NavigationNode ( cat . name , cat . get_absolute_url ( ) , cat . pk , n4 . parent_id , 'sampleapp' ) #NEWLINE# nodes . append ( n ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# n = NavigationNode ( _ ( 'sample root page' ) , reverse ( 'sample-root' ) , 1 ) #NEWLINE# n2 = NavigationNode ( _ ( 'sample settings page' ) , reverse ( 'sample-settings' ) , 2 ) #NEWLINE# n3 = NavigationNode ( _ ( 'sample account page' ) , reverse ( 'sample-account' ) , 3 ) #NEWLINE# n4 = NavigationNode ( _ ( 'sample my profile page' ) , reverse ( 'sample-profile' ) , 4 , 3 ) #NEWLINE# nodes . append ( n ) #NEWLINE# nodes . append ( n2 ) #NEWLINE# nodes . append ( n3 ) #NEWLINE# nodes . append ( n4 ) #NEWLINE# #UNINDENT# except NoReverseMatch : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# return nodes