#NEWLINE# @ register . simple_tag #NEWLINE# def static( url ) : #NEWLINE# #INDENT# resource_url = url #NEWLINE# version = resource_versions . get ( resource_url ) #NEWLINE# url = ( ( settings . STATIC_CDN + settings . STATIC_URL ) + url ) #NEWLINE# is_less = url . endswith ( '.less' ) #NEWLINE# if ( version and ( not is_less ) ) : #NEWLINE# #INDENT# url += ( '?version=%s' % version ) #NEWLINE# #UNINDENT# return url