#NEWLINE# def get_module_class( class_path ) : #NEWLINE# #INDENT# '\n    imports and returns module class from ``path.to.module.Class``\n    argument\n    ' #NEWLINE# ( mod_name , cls_name ) = class_path . rsplit ( '.' , 1 ) #NEWLINE# try : #NEWLINE# #INDENT# mod = import_module ( class_path ) #NEWLINE# #UNINDENT# except ImportError as e : #NEWLINE# #INDENT# raise ImproperlyConfigured ( ( 'Error importing module %s: "%s"' % ( mod_name , e ) ) ) #NEWLINE# #UNINDENT# return getattr ( mod , cls_name )