#NEWLINE# def get( self , request , pk = None ) : #NEWLINE# #INDENT# top_level_forum = None #NEWLINE# if ( pk is not None ) : #NEWLINE# #INDENT# top_level_forum = get_object_or_404 ( Forum , pk = pk ) #NEWLINE# forums = request . forum_permission_handler . forum_list_filter ( top_level_forum . get_descendants ( include_self = True ) , request . user ) #NEWLINE# redirect_to = reverse ( 'forum:forum' , kwargs = { #NEWLINE# #INDENT# 'slug' : top_level_forum . slug , #NEWLINE# 'pk' : pk , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# forums = request . forum_permission_handler . forum_list_filter ( Forum . objects . all ( ) , request . user ) #NEWLINE# redirect_to = reverse ( 'forum:index' ) #NEWLINE# #UNINDENT# track_handler . mark_forums_read ( forums , request . user ) #NEWLINE# if len ( forums ) : #NEWLINE# #INDENT# messages . success ( request , self . success_message ) #NEWLINE# #UNINDENT# return HttpResponseRedirect ( redirect_to )