def get_module_class(class_path):
 (mod_name, cls_name) = class_path.rsplit(u'.', 1)
 try:
  mod = import_module(mod_name)
 except ImportError as e:
  raise ImproperlyConfigured((u'Error importing module %s: "%s"' % (mod_name, e)))
 return getattr(mod, cls_name)

def get_module_class ( class_path ) : ( mod_name , cls_name ) = class_path . rsplit ( u'.' , 1 ) try : mod = import_module ( mod_name ) except ImportError as e : raise ImproperlyConfigured ( ( u'Error importing module %s: "%s"' % ( mod_name , e ) ) ) return getattr ( mod , cls_name )
imports and returns module class from path .