Skip to content

Commit fa18e42

Browse files
committed
django settings changes
1 parent 63c4e1b commit fa18e42

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

core/settings/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
SECRET_KEY = env("DJANGO_SECRET_KEY")
3131

3232
# SECURITY WARNING: don't run with debug turned on in production!
33-
DEBUG = env.bool("DJANGO_DEBUG", False)
33+
DEBUG = env.bool("DJANGO_DEBUG", default=False)
3434

3535
ENVIRONMENT = env("ENVIRONMENT")
3636

core/settings/production.py

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
# pylint: skip-file
2-
3-
import sentry_sdk
4-
from sentry_sdk.integrations.celery import CeleryIntegration
5-
from sentry_sdk.integrations.django import DjangoIntegration
6-
72
from .base import * # noqa
83
from .base import env
94

@@ -48,9 +43,11 @@
4843
# STORAGES
4944
# ------------------------------------------------------------------------------
5045
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings
51-
AWS_ACCESS_KEY_ID = env("DJANGO_AWS_ACCESS_KEY_ID", default=None)
52-
AWS_SECRET_ACCESS_KEY = env("DJANGO_AWS_SECRET_ACCESS_KEY", default=None)
53-
AWS_STORAGE_BUCKET_NAME = env("DJANGO_AWS_STORAGE_BUCKET_NAME")
46+
47+
AWS_STORAGE_BUCKET_NAME = env("DJANGO_AWS_STORAGE_BUCKET_NAME", default=None)
48+
# We dont need access key . The instance we use in Sleakops already access to the buckets
49+
# AWS_ACCESS_KEY_ID = env("DJANGO_AWS_ACCESS_KEY_ID", default=None)
50+
# AWS_SECRET_ACCESS_KEY = env("DJANGO_AWS_SECRET_ACCESS_KEY", default=None)
5451

5552
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#cloudfront
5653
# AWS_S3_CUSTOM_DOMAIN = env("DJANGO_AWS_S3_CUSTOM_DOMAIN", default=None)
@@ -64,3 +61,21 @@
6461
# ------------------------------------------------------------------------------
6562
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
6663

64+
65+
66+
#
67+
# Sentry
68+
# -------------------------------------------------------------------------------
69+
# import sentry_sdk
70+
# from sentry_sdk.integrations.celery import CeleryIntegration
71+
# from sentry_sdk.integrations.django import DjangoIntegration
72+
# SENTRY_DSN = env("SENTRY_DSN", None)
73+
# sentry_sdk.init(
74+
# dsn=SENTRY_DSN,
75+
# integrations=[DjangoIntegration(), CeleryIntegration()],
76+
# environment=ENVIRONMENT, # noqa
77+
# traces_sample_rate=env.float("SENTRY_TRACES_SAMPLE_RATE", default=0.0),
78+
# # If you wish to associate users to errors (assuming you are using
79+
# # django.contrib.auth) you may enable sending PII data.
80+
# send_default_pii=True,
81+
# )

0 commit comments

Comments
 (0)