<s> def autodiscover ( ) : <EOL> """<STR_LIT>""" <EOL> import copy <EOL> from django . conf import settings <EOL> from django . utils . importlib import import_module <EOL> from django . utils . module_loading import module_has_submodule <EOL> from freenasUI . freeadmin . site import site <EOL> for app in settings . INSTALLED_APPS : <EOL> mod = import_module ( app ) <EOL> try : <EOL> before_import_registry = copy . copy ( site . _registry ) <EOL> import_module ( '<STR_LIT>' % app ) <EOL> except : <EOL> site . _registry = before_import_registry <EOL> if module_has_submodule ( mod , '<STR_LIT>' ) : <EOL> raise </s>
