code: def import_task_modules():
      
      top_level_modules = settings.INSTALLED_APPS
      module_names = []
      for module in top_level_modules:
          #Import package
          mod = import_module(module)
          #Find all modules in package path
          for loader, module_name, is_pkg in  pkgutil.walk_packages(mod.__path__):
              if not module_name.startswith("__"):
                  #If the module is not __init__, add it to the registry
                  submod_name = "{0}.{1}".format(module,module_name)
                  module_names.append(submod_name)
      #Once everything is imported, the metaclass will register them automatically
      modules = map(import_module, module_names)
      return modules
docs: Import all installed apps and add modules to registry