<s> from giotto . middleware import GiottoOutputMiddleware <EOL> class AppendMessages ( GiottoOutputMiddleware ) : <EOL> def html ( self , request , response ) : <EOL> from . models import Message <EOL> user = getattr ( request , '<STR_LIT:user>' , None ) <EOL> if not user : <EOL> return response <EOL> engine , template , context = response . data <EOL> context [ '<STR_LIT>' ] = Message . get ( user = user ) <EOL> response . body = ( engine , template , context ) <EOL> return response </s>
