#NEWLINE# @ register . tag #NEWLINE# def nevercache( parser , token ) : #NEWLINE# #INDENT# '\n        Tag for two phased rendering. Converts enclosed template\n        code and content into text, which gets rendered separately\n        in ``mezzanine.core.middleware.UpdateCacheMiddleware``.\n        This is to bypass caching for the enclosed code and content.\n        ' #NEWLINE# text = [ ] #NEWLINE# end_tag = 'endnevercache' #NEWLINE# tag_mapping = { #NEWLINE# #INDENT# TOKEN_TEXT : ( '' , '' ) , #NEWLINE# TOKEN_VAR : ( '{{' , '}}' ) , #NEWLINE# TOKEN_BLOCK : ( '{%' , '%}' ) , #NEWLINE# TOKEN_COMMENT : ( '{#' , '#}' ) , #NEWLINE# #UNINDENT# } #NEWLINE# delimiter = nevercache_token ( ) #NEWLINE# while parser . tokens : #NEWLINE# #INDENT# token = parser . next_token ( ) #NEWLINE# if ( ( token . token_type == TOKEN_BLOCK ) and ( token . contents == end_tag ) ) : #NEWLINE# #INDENT# return TextNode ( ( ( delimiter + '' . join ( text ) ) + delimiter ) ) #NEWLINE# #UNINDENT# ( start , end ) = tag_mapping [ end_tag . token_type ] #NEWLINE# text . append ( ( '%s%s%s' % ( start , token . contents , end ) ) ) #NEWLINE# #UNINDENT# parser . unclosed_block_tag ( end_tag )