def load_class(dotted_path):
 dotted_path_split = dotted_path.split('.')
 if (len(dotted_path_split) > 1):
  klass_name = dotted_path_split[(-1)]
  module_name = '.'.join(dotted_path_split[:(-1)])
  module = load_module(module_name)
  if has_attribute(module, klass_name):
   klass = getattr(module, klass_name)
   return klass
  else:
   raise AttributeError(('Module %s does not have class attribute %s' % (module_name, klass_name)))
 else:
  raise ValueError(('Dotted module path %s must contain a module name and a classname' % dotted_path))

def load_class ( dotted_path ) : dotted_path_split = dotted_path . split ( '.' ) if ( len ( dotted_path_split ) > 1 ) : klass_name = dotted_path_split [ ( - 1 ) ] module_name = '.' . join ( dotted_path_split [ : ( - 1 ) ] ) module = load_module ( module_name ) if has_attribute ( module , klass_name ) : klass = getattr ( module , klass_name ) return klass else : raise AttributeError ( ( 'Module %s does not have class attribute %s' % ( module_name , klass_name ) ) ) else : raise ValueError ( ( 'Dotted module path %s must contain a module name and a classname' % dotted_path ) )
finds the class registered to the alias .