mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #21060 -- Refactored admin's autodiscover method to make it reusable.
We want to be able to use it for instance for discovering `tasks.py` modules inside the INSTALLED_APPS. This commit therefore moves the logic to `autodiscover_modules` method in django.utils.module_loading.
This commit is contained in:
committed by
Tim Graham
parent
39b49fd339
commit
6feb75129f
8
tests/utils_tests/test_module/another_bad_module.py
Normal file
8
tests/utils_tests/test_module/another_bad_module.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from . import site
|
||||
content = 'Another Bad Module'
|
||||
|
||||
site._registry.update({
|
||||
'foo': 'bar',
|
||||
})
|
||||
|
||||
raise Exception('Some random exception.')
|
||||
Reference in New Issue
Block a user