#NEWLINE# def feed_detail( request , feed_id , tag = None , slug = None ) : #NEWLINE# #INDENT# feed = get_object_or_404 ( Feed , pk = feed_id ) #NEWLINE# if ( not slug ) : #NEWLINE# #INDENT# return redirect ( feed , permanent = True ) #NEWLINE# #UNINDENT# if tag : #NEWLINE# #INDENT# tag = get_object_or_404 ( Tag , name = tag ) #NEWLINE# posts = TaggedItem . objects . get_by_model ( Post . site_objects , tag ) . filter ( feed = feed ) . order_by ( '-date_modified' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# posts = Post . site_objects . filter ( feed = feed ) . order_by ( '-date_modified' ) #NEWLINE# #UNINDENT# return render_to_response ( 'planet/feeds/detail.html' , { #NEWLINE# #INDENT# 'feed' : feed , #NEWLINE# 'posts' : posts , #NEWLINE# 'tag' : tag , #NEWLINE# #UNINDENT# } , context_instance = RequestContext ( request ) )