diff options
Diffstat (limited to 'django/utils/autoreload.py')
| -rw-r--r-- | django/utils/autoreload.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py index 17631e15ef..dc7c9b2cea 100644 --- a/django/utils/autoreload.py +++ b/django/utils/autoreload.py @@ -272,7 +272,12 @@ class BaseReloader: from django.urls import get_resolver # Prevent a race condition where URL modules aren't loaded when the # reloader starts by accessing the urlconf_module property. - get_resolver().urlconf_module + try: + get_resolver().urlconf_module + except Exception: + # Loading the urlconf can result in errors during development. + # If this occurs then swallow the error and continue. + pass logger.debug('Apps ready_event triggered. Sending autoreload_started signal.') autoreload_started.send(sender=self) self.run_loop() |
