def get_class_from_str(class_path):
 (module_path, klass_name) = class_path.rsplit(u'.', 1)
 module = import_module(module_path)
 return getattr(module, klass_name)

def get_class_from_str ( class_path ) : ( module_path , klass_name ) = class_path . rsplit ( u'.' , 1 ) module = import_module ( module_path ) return getattr ( module , klass_name )
dynamically load a view class from a string path "myapp .