|  | 
| 28 | 28 | # See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/ | 
| 29 | 29 | 
 | 
| 30 | 30 | # Take environment variables from .env file | 
| 31 |  | -environ.Env.read_env(os.path.join(BASE_DIR, '.env')) | 
|  | 31 | +environ.Env.read_env(os.path.join(BASE_DIR, ".env")) | 
| 32 | 32 | 
 | 
| 33 | 33 | # SECURITY WARNING: keep the secret key used in production secret! | 
| 34 |  | -SECRET_KEY = env('SECRET_KEY') | 
|  | 34 | +SECRET_KEY = env("SECRET_KEY") | 
| 35 | 35 | 
 | 
| 36 | 36 | # SECURITY WARNING: don't run with debug turned on in production! | 
| 37 |  | -DEBUG = env('DEBUG') | 
|  | 37 | +DEBUG = env("DEBUG") | 
| 38 | 38 | 
 | 
| 39 |  | -ALLOWED_HOSTS = env.list('ALLOWED_HOSTS') | 
| 40 |  | -CSRF_TRUSTED_ORIGINS = env.list('CSRF_TRUSTED_ORIGINS') | 
|  | 39 | +ALLOWED_HOSTS = env.list("ALLOWED_HOSTS") | 
|  | 40 | +CSRF_TRUSTED_ORIGINS = env.list("CSRF_TRUSTED_ORIGINS") | 
| 41 | 41 | 
 | 
| 42 | 42 | # Application definition | 
| 43 | 43 | 
 | 
|  | 
| 100 | 100 | 
 | 
| 101 | 101 | WSGI_APPLICATION = "rewardme.wsgi.application" | 
| 102 | 102 | 
 | 
| 103 |  | -if USE_SQLITE := env('USE_SQLITE'): | 
|  | 103 | +if USE_SQLITE := env("USE_SQLITE"): | 
| 104 | 104 |     DATABASES = { | 
| 105 | 105 |         "default": { | 
| 106 | 106 |             "ENGINE": "django.db.backends.sqlite3", | 
|  | 
| 110 | 110 | else: | 
| 111 | 111 |     DATABASES = { | 
| 112 | 112 |         "default": { | 
| 113 |  | -            'ENGINE': 'django.db.backends.postgresql', | 
|  | 113 | +            "ENGINE": "django.db.backends.postgresql", | 
| 114 | 114 |             "NAME": env("DB_NAME"), | 
| 115 | 115 |             "USER": env("DB_USER"), | 
| 116 | 116 |             "PASSWORD": env("DB_PASSWORD"), | 
|  | 
| 159 | 159 | STATIC_ROOT = BASE_DIR / "staticfiles" | 
| 160 | 160 | COMPRESS_ENABLED = True | 
| 161 | 161 | STATICFILES_FINDERS = ( | 
| 162 |  | -    'django.contrib.staticfiles.finders.FileSystemFinder', | 
| 163 |  | -    'django.contrib.staticfiles.finders.AppDirectoriesFinder', | 
| 164 |  | -    'compressor.finders.CompressorFinder', | 
|  | 162 | +    "django.contrib.staticfiles.finders.FileSystemFinder", | 
|  | 163 | +    "django.contrib.staticfiles.finders.AppDirectoriesFinder", | 
|  | 164 | +    "compressor.finders.CompressorFinder", | 
| 165 | 165 | ) | 
| 166 | 166 | 
 | 
| 167 | 167 | # Default primary key field type | 
|  | 
| 185 | 185 | ) | 
| 186 | 186 | 
 | 
| 187 | 187 | # Sentry | 
| 188 |  | -if USE_SENTRY := env.bool('USE_SENTRY', default=False): | 
|  | 188 | +if USE_SENTRY := env.bool("USE_SENTRY", default=False): | 
| 189 | 189 |     import sentry_sdk | 
| 190 | 190 |     from sentry_sdk.integrations.django import DjangoIntegration | 
| 191 | 191 | 
 | 
| 192 | 192 |     sentry_sdk.init( | 
| 193 |  | -        dsn=env('SENTRY_DSN'), | 
|  | 193 | +        dsn=env("SENTRY_DSN"), | 
| 194 | 194 |         integrations=[DjangoIntegration()], | 
| 195 |  | -        traces_sample_rate=env.float('SENTRY_TRACES_SAMPLE_RATE', default=0.1), | 
|  | 195 | +        traces_sample_rate=env.float("SENTRY_TRACES_SAMPLE_RATE", default=0.1), | 
| 196 | 196 |         send_default_pii=True, | 
| 197 |  | -        release=env('SENTRY_RELEASE'), | 
|  | 197 | +        release=env("SENTRY_RELEASE"), | 
| 198 | 198 |     ) | 
0 commit comments