#NEWLINE# def on_html_document( self , app , request , doc ) : #NEWLINE# #INDENT# 'Add the user-token meta tag\n        ' #NEWLINE# if ( request . method == 'GET' ) : #NEWLINE# #INDENT# session = request . cache . session #NEWLINE# if ( session and session . user ) : #NEWLINE# #INDENT# doc . head . add_meta ( name = 'user-token' , content = session . encoded )