<s> """<STR_LIT>""" <EOL> from djangoflash . context_processors import CONTEXT_VAR <EOL> def keep_messages ( * keys ) : <EOL> """<STR_LIT>""" <EOL> def _keep_messages ( view_method ) : <EOL> def _wrapped_view_method ( request , * args , ** kwargs ) : <EOL> if hasattr ( request , CONTEXT_VAR ) : <EOL> flash = getattr ( request , CONTEXT_VAR ) <EOL> flash . keep ( * keys ) <EOL> return view_method ( request , * args , ** kwargs ) <EOL> return _wrapped_view_method <EOL> if len ( keys ) == <NUM_LIT:1> and callable ( keys [ <NUM_LIT:0> ] ) : <EOL> view_method = keys [ <NUM_LIT:0> ] <EOL> keys = [ ] <EOL> return _keep_messages ( view_method ) <EOL> return _keep_messages </s>
