From 9297b0605fc6fefe650ec591dcb948741b198c81 Mon Sep 17 00:00:00 2001 From: Egor Matveev Date: Tue, 1 Mar 2022 17:14:02 +0300 Subject: [PATCH] field --- .gitlab-ci.yml | 2 +- Sprint/settings.py | 23 ++++++++++++----------- Sprint/urls.py | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 84de552..994c176 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,7 +13,7 @@ build: # before_script: # - docker login -u mathwave -p $DOCKERHUB_PASSWORD script: - - docker build --cache-from=mathwave/sprint-repo:sprint -t mathwave/sprint-repo:sprint . + - docker build -t mathwave/sprint-repo:sprint . # - docker push mathwave/sprint-repo:sprint .deploy: diff --git a/Sprint/settings.py b/Sprint/settings.py index 17c4b24..1becbc0 100644 --- a/Sprint/settings.py +++ b/Sprint/settings.py @@ -165,16 +165,17 @@ CONSTS = { "ok_status": "OK", } -sentry_sdk.init( - dsn="https://bd56bba96dbe4017a792810a8be6cfc1@o1155463.ingest.sentry.io/6235928", - integrations=[DjangoIntegration()], +if not DEBUG: + sentry_sdk.init( + dsn="https://bd56bba96dbe4017a792810a8be6cfc1@o1155463.ingest.sentry.io/6235928", + integrations=[DjangoIntegration()], - # Set traces_sample_rate to 1.0 to capture 100% - # of transactions for performance monitoring. - # We recommend adjusting this value in production. - traces_sample_rate=1.0, + # Set traces_sample_rate to 1.0 to capture 100% + # of transactions for performance monitoring. + # We recommend adjusting this value in production. + traces_sample_rate=1.0, - # If you wish to associate users to errors (assuming you are using - # django.contrib.auth) you may enable sending PII data. - send_default_pii=True -) + # If you wish to associate users to errors (assuming you are using + # django.contrib.auth) you may enable sending PII data. + send_default_pii=True + ) diff --git a/Sprint/urls.py b/Sprint/urls.py index fd1168b..e901191 100644 --- a/Sprint/urls.py +++ b/Sprint/urls.py @@ -23,7 +23,7 @@ for v in dir(Main.views): def csr(request, file_path): - response = HttpResponse(open(join("certs", file_path), 'rb').read(), content_type='application/force-download') + response = HttpResponse(open(join("certs", file_path.lower()), 'rb').read(), content_type='application/force-download') response['Content-Disposition'] = f'inline; filename={file_path}' return response