|
22 | 22 |
|
23 | 23 | from .cache_settings import * |
24 | 24 |
|
25 | | -env = environ.Env(DEBUG=(bool, False)) |
26 | | -DEBUG = env.bool("DEBUG", default=True) |
27 | 25 | # Build paths inside the project like this: BASE_DIR / 'subdir'. |
28 | 26 | BASE_DIR = Path(__file__).resolve().parent.parent |
| 27 | + |
| 28 | +# Load .env file FIRST, before reading any env variables |
| 29 | +env = environ.Env(DEBUG=(bool, False)) |
29 | 30 | environ.Env.read_env(os.path.join(BASE_DIR, ".env")) |
30 | 31 |
|
| 32 | +DEBUG = env.bool("DEBUG", default=True) |
| 33 | + |
31 | 34 | # Quick-start development settings - unsuitable for production |
32 | 35 | # See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ |
33 | 36 |
|
|
274 | 277 | "search.documents.dataset_document": "dataset", |
275 | 278 | "search.documents.usecase_document": "usecase", |
276 | 279 | "search.documents.aimodel_document": "aimodel", |
| 280 | + "search.documents.collaborative_document": "collaborative", |
| 281 | + "search.documents.publisher_document.OrganizationPublisherDocument": "organization_publisher", |
| 282 | + "search.documents.publisher_document.UserPublisherDocument": "user_publisher", |
277 | 283 | } |
278 | 284 |
|
279 | 285 |
|
|
301 | 307 |
|
302 | 308 | # Swagger Settings |
303 | 309 | SWAGGER_SETTINGS = { |
304 | | - "SECURITY_DEFINITIONS": { |
305 | | - "Bearer": {"type": "apiKey", "name": "Authorization", "in": "header"} |
306 | | - } |
| 310 | + "SECURITY_DEFINITIONS": {"Bearer": {"type": "apiKey", "name": "Authorization", "in": "header"}} |
307 | 311 | } |
308 | 312 |
|
309 | 313 | # Structured Logging Configuration |
|
370 | 374 |
|
371 | 375 | # OpenTelemetry Sampling Configuration |
372 | 376 | OTEL_TRACES_SAMPLER = "parentbased_traceidratio" |
373 | | -OTEL_TRACES_SAMPLER_ARG = os.getenv( |
374 | | - "OTEL_TRACES_SAMPLER_ARG", "1.0" |
375 | | -) # Sample 100% in dev |
| 377 | +OTEL_TRACES_SAMPLER_ARG = os.getenv("OTEL_TRACES_SAMPLER_ARG", "1.0") # Sample 100% in dev |
376 | 378 |
|
377 | 379 | # OpenTelemetry Metrics Configuration |
378 | | -OTEL_METRIC_EXPORT_INTERVAL_MILLIS = int( |
379 | | - os.getenv("OTEL_METRIC_EXPORT_INTERVAL_MILLIS", "30000") |
380 | | -) |
381 | | -OTEL_METRIC_EXPORT_TIMEOUT_MILLIS = int( |
382 | | - os.getenv("OTEL_METRIC_EXPORT_TIMEOUT_MILLIS", "30000") |
383 | | -) |
| 380 | +OTEL_METRIC_EXPORT_INTERVAL_MILLIS = int(os.getenv("OTEL_METRIC_EXPORT_INTERVAL_MILLIS", "30000")) |
| 381 | +OTEL_METRIC_EXPORT_TIMEOUT_MILLIS = int(os.getenv("OTEL_METRIC_EXPORT_TIMEOUT_MILLIS", "30000")) |
384 | 382 |
|
385 | 383 | # OpenTelemetry Instrumentation Configuration |
386 | 384 | OTEL_PYTHON_DJANGO_INSTRUMENT = True |
|
0 commit comments