#NEWLINE# def find_asset( theme , asset ) : #NEWLINE# #INDENT# theme_path = '' #NEWLINE# for ( name , label , path ) in hz_themes . get_themes ( ) : #NEWLINE# #INDENT# if ( theme == name ) : #NEWLINE# #INDENT# theme_path = path #NEWLINE# #UNINDENT# #UNINDENT# theme_path = os . path . join ( settings . ROOT_PATH , theme_path ) #NEWLINE# static_path = os . path . join ( theme_path , 'static' ) #NEWLINE# if os . path . exists ( static_path ) : #NEWLINE# #INDENT# theme_path = static_path #NEWLINE# #UNINDENT# asset_path = os . path . join ( theme_path , asset ) #NEWLINE# if os . path . exists ( asset_path ) : #NEWLINE# #INDENT# return_path = os . path . join ( hz_themes . get_theme_dir ( ) , theme , asset ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return_path = os . path . join ( 'dashboard' , asset ) #NEWLINE# #UNINDENT# return staticfiles_storage . url ( pathname2url ( return_path ) )