#NEWLINE# @ register . function #NEWLINE# @ jinja2 . contextfunction #NEWLINE# def cache_buster( context , url ) : #NEWLINE# #INDENT# if ( 'BUILD_ID' in context ) : #NEWLINE# #INDENT# build = context [ 'BUILD_ID' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if url . endswith ( '.js' ) : #NEWLINE# #INDENT# build = context [ 'BUILD_ID_JS' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if url . endswith ( '.css' ) : #NEWLINE# #INDENT# build = context [ 'BUILD_ID_CSS' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# build = context [ 'BUILD_ID_IMG' ] #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return utils . urlparams ( build , b = build )