def get_commands():
 global _commands
 if (_commands is None):
  _commands = dict([(name, 'django.core') for name in find_commands(__path__[0])])
  from django.conf import settings
  try:
   apps = settings.INSTALLED_APPS
  except ImproperlyConfigured:
   apps = []
  for app_name in apps:
   try:
    path = find_management_module(app_name)
    _commands.update(dict([(name, app_name) for name in find_commands(path)]))
   except ImportError:
    pass
 return _commands

def get_commands ( ) : global _commands if ( _commands is None ) : _commands = dict ( [ ( name , 'django.core' ) for name in find_commands ( __path__ [ 0 ] ) ] ) from django . conf import settings try : apps = settings . INSTALLED_APPS except ImproperlyConfigured : apps = [ ] for app_name in apps : try : path = find_management_module ( app_name ) _commands . update ( dict ( [ ( name , app_name ) for name in find_commands ( path ) ] ) ) except ImportError : pass return _commands
returns a dictionary mapping command names to their callback applications .