#NEWLINE# def render( self , context ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# obj = Variable ( self . obj ) . resolve ( context ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# return '' #NEWLINE# #UNINDENT# extra_context = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# try : #NEWLINE# #INDENT# user = Variable ( 'user' ) . resolve ( context ) #NEWLINE# if user . is_authenticated ( ) : #NEWLINE# #INDENT# extra_context [ 'user_rating' ] = RatingData . objects . user_rating ( obj , user ) #NEWLINE# #UNINDENT# csrf = Variable ( 'csrf_token' ) . resolve ( context ) #NEWLINE# extra_context [ 'csrf_token' ] = csrf #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# return render ( obj , ** extra_context )