diff options
Diffstat (limited to 'example_project')
| -rw-r--r-- | example_project/settings.py | 15 | 
1 files changed, 14 insertions, 1 deletions
diff --git a/example_project/settings.py b/example_project/settings.py index b858c5907..11013daad 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -6,6 +6,12 @@ import os  import sys  from importlib import import_module +try: +    import sentry_sdk +    from sentry_sdk.integrations.django import DjangoIntegration +except ImportError: +    sentry_sdk = None +  DEBUG = False  DEBUG_TOOLBAR = False  DEBUG_TO_CONSOLE = False @@ -286,8 +292,8 @@ MAX_UPLOAD_SIZE = 100  # in Mo  DOT_BINARY = "/usr/bin/dot"  TEST_RUNNER = 'ishtar_common.tests.ManagedModelTestRunner' -  CELERY_BROKER_URL = '' +SENTRY_ID = None  try:      from local_settings import * @@ -392,3 +398,10 @@ if 'test' in sys.argv:  if not DEBUG:      # persistent connection      DATABASES['default']['CONN_MAX_AGE'] = 600 + +if SENTRY_ID and sentry_sdk: +    sentry_sdk.init( +        dsn=SENTRY_ID, +        integrations=[DjangoIntegration()], +        send_default_pii=True +    )  | 
