#NEWLINE# def update_badges( overwrite = False ) : #NEWLINE# #INDENT# from django.utils.importlib import import_module #NEWLINE# for app in settings . INSTALLED_APPS : #NEWLINE# #INDENT# mod = import_module ( app ) #NEWLINE# try : #NEWLINE# #INDENT# badges_mod = import_module ( ( '%s.badges' % app ) ) #NEWLINE# fixture_label = ( '%s_badges' % app . replace ( '.' , '_' ) ) #NEWLINE# call_command ( 'loaddata' , fixture_label , verbosity = 1 ) #NEWLINE# if hasattr ( badges_mod , 'badges' ) : #NEWLINE# #INDENT# badger . utils . update_badges ( app . badges , overwrite ) #NEWLINE# #UNINDENT# if hasattr ( badges_mod , 'update_badges' ) : #NEWLINE# #INDENT# badges_mod . update_badges ( overwrite ) #NEWLINE# #UNINDENT# #UNINDENT# except ImportError : #NEWLINE# #INDENT# if module_has_submodule ( mod , 'badges' ) : #NEWLINE# #INDENT# raise