#NEWLINE# def autodiscover( ) : #NEWLINE# #INDENT# '\n    Auto-discover INSTALLED_APPS admin.py modules and fail silently when\n    not present. This forces an import on them to register any admin bits they\n    may want.\n    ' #NEWLINE# import copy #NEWLINE# from django.conf import settings #NEWLINE# from django.utils.importlib import import_module #NEWLINE# from django.utils.module_loading import module_has_submodule #NEWLINE# for app in settings . INSTALLED_APPS : #NEWLINE# #INDENT# if ( app == 'django.contrib.auth' ) : #NEWLINE# #INDENT# admin . site . register ( Group , GroupAdmin ) #NEWLINE# continue #NEWLINE# #UNINDENT# mod = import_module ( app ) #NEWLINE# try : #NEWLINE# #INDENT# before_import_registry = copy . copy ( site . _registry ) #NEWLINE# import_module ( ( '%s.admin' % app ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# site . _registry = before_import_registry #NEWLINE# if module_has_submodule ( mod , 'admin' ) : #NEWLINE# #INDENT# raise