<s> from __future__ import print_function <EOL> import imp <EOL> from django . conf import settings <EOL> from importlib import import_module <EOL> import sys <EOL> def get_static_renderers ( ) : <EOL> module_name = '<STR_LIT>' <EOL> renderers = [ ] <EOL> modules_to_check = [ ] <EOL> settings_module = settings . SETTINGS_MODULE <EOL> if settings_module : <EOL> if "<STR_LIT:.>" in settings_module : <EOL> settings_module = settings_module . split ( "<STR_LIT:.>" , <NUM_LIT:1> ) [ <NUM_LIT:0> ] <EOL> modules_to_check += [ settings_module , ] <EOL> modules_to_check += filter ( <EOL> lambda x : ( x != "<STR_LIT>" ) and ( x != settings_module ) , <EOL> settings . INSTALLED_APPS <EOL> ) <EOL> for app in modules_to_check : <EOL> try : <EOL> import_module ( app ) <EOL> app_path = sys . modules [ app ] . __path__ <EOL> except AttributeError : <EOL> print ( "<STR_LIT>" % app ) <EOL> continue <EOL> try : <EOL> imp . find_module ( module_name , app_path ) <EOL> except ImportError : <EOL> print ( "<STR_LIT>" % app ) <EOL> continue <EOL> try : <EOL> app_render_module = import_module ( '<STR_LIT>' % ( app , module_name ) ) <EOL> if hasattr ( app_render_module , "<STR_LIT>" ) : <EOL> renderers += getattr ( app_render_module , module_name ) <EOL> else : <EOL> print ( "<STR_LIT>" "<STR_LIT>" % ( app , app ) ) <EOL> except AttributeError : <EOL> print ( "<STR_LIT>" % ( <EOL> app , app <EOL> ) ) <EOL> continue <EOL> print ( "<STR_LIT>" % app ) <EOL> return tuple ( renderers ) </s>
