#NEWLINE# def fetch_profile( request ) : #NEWLINE# #INDENT# ' attaches the user.profile object into the request object' #NEWLINE# context = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if request . user . is_authenticated ( ) : #NEWLINE# #INDENT# profile_module_name = get_my_profile_module_name ( ) #NEWLINE# profile = getattr ( request , request , None ) #NEWLINE# if ( profile != None ) : #NEWLINE# #INDENT# context [ profile_module_name ] = profile #NEWLINE# #UNINDENT# #UNINDENT# return context