def load_module(self, module):
if isinstance(module, str) and module.find('<STR_LIT:.>') > -<NUM_LIT:1>:<EOL><INDENT>a = module.split('<STR_LIT:.>')<EOL>module = ('<STR_LIT>' % a[-<NUM_LIT:1>], '<STR_LIT:.>'.join(a[:-<NUM_LIT:1>]))<EOL><DEDENT>try:<EOL><INDENT>module = import_module(*module)<EOL><DEDENT>except Exception as e:<EOL><INDENT>return e<EOL><DEDENT>for name in dir(module):<EOL><INDENT>if name.startswith('<STR_LIT:_>'): continue<EOL>obj = getattr(module, name)<EOL>if callable(obj):<EOL><INDENT>for tag in settings.TAG_TYPES:<EOL><INDENT>if hasattr(obj, tag) and getattr(obj, tag) in (<NUM_LIT:1>, True):<EOL><INDENT>name = getattr(obj, '<STR_LIT:name>', obj.__name__)<EOL>if name in self[tag]:<EOL><INDENT>continue<EOL><DEDENT>if hasattr(obj, '<STR_LIT:name>'):<EOL><INDENT>self.register(tag, getattr(obj, '<STR_LIT:name>'), obj)<EOL><DEDENT>else:<EOL><INDENT>self.register(tag, obj)<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>
Load a module string like django.contrib.markup.templatetags.markup into the registry
Iterates through the module looking for callables w/ attributes matching Native Tags