71 | | return __import__('%s.%s.%s' % (MODEL_PREFIX, app_label, module_name), '', '', ['']) |
| 71 | try: |
| 72 | return __import__('%s.%s.%s' % (MODEL_PREFIX, app_label, module_name), '', '', ['']) |
| 73 | except ImportError, e: |
| 74 | try: |
| 75 | app = __import__('%s.%s' % (MODEL_PREFIX, app_label), '', '', ['']) |
| 76 | except ImportError, e: |
| 77 | raise ImportError('Unable to import app_label "%s": %s' |
| 78 | % ( app_label, str(e) )) |
| 79 | raise ImportError('Unable to import module_name "%s": ' |
| 80 | '%s (available choices: %s)' |
| 81 | % ( module_name, str(e), str(dir(app)) )) |