#NEWLINE# def archive_view( request , slug ) : #NEWLINE# #INDENT# site = Site . objects . get_current ( ) #NEWLINE# if slug : #NEWLINE# #INDENT# object = get_object_or_404 ( Channel , slug = slug ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# object = None #NEWLINE# #UNINDENT# channels = Channel . current . all ( ) #NEWLINE# channels_filtered = [ ] #NEWLINE# for channel in channels : #NEWLINE# #INDENT# for section in channel . section . all ( ) : #NEWLINE# #INDENT# if ( section . publication . site == site ) : #NEWLINE# #INDENT# channels_filtered . append ( channel ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# channels = channels_filtered #NEWLINE# page = { #NEWLINE# #INDENT# 'channels' : channels , #NEWLINE# 'object' : object , #NEWLINE# #UNINDENT# } #NEWLINE# return render_to_response ( 'podcasts/episode_list.html' , page , context_instance = RequestContext ( request ) )