Report if there are any errors in local_settings.
This will issue a `UserWarning` in case some kind of exception is being raised inside local_settings.py
This commit is contained in:
Родитель
676551c637
Коммит
7949c933be
|
@ -149,5 +149,9 @@ INBOUND_EMAIL_VALIDATION_KEY = 'totally-unsecure-validation-string'
|
|||
# If you have settings you want to overload, put them in a local_settings.py.
|
||||
try:
|
||||
from local_settings import * # noqa
|
||||
except ImportError:
|
||||
pass
|
||||
except ImportError as exc:
|
||||
import warnings
|
||||
import traceback
|
||||
|
||||
warnings.warn('Could not import local_settings module. {}'.format(
|
||||
traceback.format_exc()))
|
||||
|
|
Загрузка…
Ссылка в новой задаче