From 3f42e025bbfe1321a80835b4f3a2041fc046104f Mon Sep 17 00:00:00 2001 From: gzbender Date: Fri, 9 Aug 2019 16:34:55 +0300 Subject: [PATCH 1/5] =?UTF-8?q?=D0=9F=D0=BE=D1=87=D0=B8=D0=BD=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20=D0=BA=D1=80=D0=B8=D1=82=D0=B8=D1=87=D0=BD=D1=8B=D0=B5?= =?UTF-8?q?=20=D0=B1=D0=B0=D0=B3=D0=B8=20=D0=B2=20JS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/templates/blocks/lil_store_js.html | 7 +- project/templates/lilcity/layer.html | 115 +++++++++++---------- 2 files changed, 62 insertions(+), 60 deletions(-) diff --git a/project/templates/blocks/lil_store_js.html b/project/templates/blocks/lil_store_js.html index 67cd6d2c..1bbb297f 100644 --- a/project/templates/blocks/lil_store_js.html +++ b/project/templates/blocks/lil_store_js.html @@ -39,12 +39,13 @@ isGiftCertificateUrl: {{ is_gift_certificate_url|yesno:"true,false" }}, }, data: {}, - urlIs: (urlPatternNames) => { + urlIs: function(urlPatternNames) { if(! Array.isArray(urlPatternNames)){ urlPatternNames = [urlPatternNames]; } - return urlPatternNames.filter( - urlPatternName => window.location.pathname.search(window.LIL_STORE.urls[urlPatternName]) > -1).length > 0; + return urlPatternNames.filter(function(urlPatternName){ + return window.location.pathname.search(window.LIL_STORE.urls[urlPatternName]) > -1; + }).length > 0; }, isIndexPage: window.location.pathname == '/', }; diff --git a/project/templates/lilcity/layer.html b/project/templates/lilcity/layer.html index 35be48c0..00a5f16c 100644 --- a/project/templates/lilcity/layer.html +++ b/project/templates/lilcity/layer.html @@ -48,68 +48,69 @@ } - - - - - - - - - - - - {% include "templates/blocks/mixpanel.html" %} {% block layer_head %}{% endblock layer_head %} {% block layer_body %} {% endblock layer_body %} + + + + + + + + + + + + {% include "templates/blocks/mixpanel.html" %} From 2194221b23f0cb4c11a898ac1684b5b865b31e16 Mon Sep 17 00:00:00 2001 From: gzbender Date: Tue, 13 Aug 2019 17:25:13 +0300 Subject: [PATCH 2/5] =?UTF-8?q?=D0=BD=D0=B5=20=D0=BE=D1=82=D0=BF=D1=80?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D1=8F=D0=B5=D1=82=D1=81=D1=8F=20=D1=81=D1=82?= =?UTF-8?q?=D0=B0=D1=82=D0=B8=D1=81=D1=82=D0=B8=D0=BA=D0=B0=20roistat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/payment/tasks.py | 2 +- project/settings.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/payment/tasks.py b/apps/payment/tasks.py index cc2e2f03..f61515e8 100644 --- a/apps/payment/tasks.py +++ b/apps/payment/tasks.py @@ -7,7 +7,7 @@ from django.conf import settings from project.celery import app -logger = logging.getLogger(__name__) +logger = logging.getLogger('project') @app.task diff --git a/project/settings.py b/project/settings.py index 3218b5a2..96db35d9 100644 --- a/project/settings.py +++ b/project/settings.py @@ -198,7 +198,6 @@ LOGGING = { }, 'log_file': { 'level': 'DEBUG', - 'filters': ['require_debug_true'], 'class': 'logging.StreamHandler', 'formatter': 'verbose', }, @@ -215,22 +214,22 @@ LOGGING = { 'py.warnings': { 'handlers': ['console', ], }, - '': { + 'project': { 'handlers': ['console', 'log_file',], 'level': "INFO", }, } } -if os.path.exists(os.path.join(BASE_DIR, '/media/logs')): + +if os.path.exists(os.path.join(BASE_DIR, 'media/logs')): LOGGING['handlers']['log_file'] = { 'level': 'INFO', 'class': 'logging.handlers.RotatingFileHandler', 'filename': 'media/logs/main.log', - 'maxBytes': 1024 * 1024 * 15, # 5 MB + 'maxBytes': 1024 * 1024 * 15, 'backupCount': 7, 'formatter': 'verbose', - 'filters': ['require_debug_false'], } # Static files (CSS, JavaScript, Images) From 8efd773c79a0acd320cef79b42f6c2fac1d33425 Mon Sep 17 00:00:00 2001 From: Danil Date: Tue, 13 Aug 2019 14:36:26 +0000 Subject: [PATCH 3/5] Revert "Merge branch 'hotfix/roistat-logs' into 'master'" This reverts merge request !373 --- apps/payment/tasks.py | 2 +- project/settings.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/payment/tasks.py b/apps/payment/tasks.py index f61515e8..cc2e2f03 100644 --- a/apps/payment/tasks.py +++ b/apps/payment/tasks.py @@ -7,7 +7,7 @@ from django.conf import settings from project.celery import app -logger = logging.getLogger('project') +logger = logging.getLogger(__name__) @app.task diff --git a/project/settings.py b/project/settings.py index 96db35d9..3218b5a2 100644 --- a/project/settings.py +++ b/project/settings.py @@ -198,6 +198,7 @@ LOGGING = { }, 'log_file': { 'level': 'DEBUG', + 'filters': ['require_debug_true'], 'class': 'logging.StreamHandler', 'formatter': 'verbose', }, @@ -214,22 +215,22 @@ LOGGING = { 'py.warnings': { 'handlers': ['console', ], }, - 'project': { + '': { 'handlers': ['console', 'log_file',], 'level': "INFO", }, } } - -if os.path.exists(os.path.join(BASE_DIR, 'media/logs')): +if os.path.exists(os.path.join(BASE_DIR, '/media/logs')): LOGGING['handlers']['log_file'] = { 'level': 'INFO', 'class': 'logging.handlers.RotatingFileHandler', 'filename': 'media/logs/main.log', - 'maxBytes': 1024 * 1024 * 15, + 'maxBytes': 1024 * 1024 * 15, # 5 MB 'backupCount': 7, 'formatter': 'verbose', + 'filters': ['require_debug_false'], } # Static files (CSS, JavaScript, Images) From 402b045bde6e890a9a25f04ffd1dcc45887269cc Mon Sep 17 00:00:00 2001 From: gzbender Date: Tue, 13 Aug 2019 17:51:56 +0300 Subject: [PATCH 4/5] =?UTF-8?q?=D0=BD=D0=B5=20=D0=BE=D1=82=D0=BF=D1=80?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D1=8F=D0=B5=D1=82=D1=81=D1=8F=20=D1=81=D1=82?= =?UTF-8?q?=D0=B0=D1=82=D0=B8=D1=81=D1=82=D0=B8=D0=BA=D0=B0=20roistat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/settings.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/project/settings.py b/project/settings.py index 96db35d9..42095f6a 100644 --- a/project/settings.py +++ b/project/settings.py @@ -215,23 +215,13 @@ LOGGING = { 'handlers': ['console', ], }, 'project': { - 'handlers': ['console', 'log_file',], + 'handlers': ['sentry',], 'level': "INFO", }, } } -if os.path.exists(os.path.join(BASE_DIR, 'media/logs')): - LOGGING['handlers']['log_file'] = { - 'level': 'INFO', - 'class': 'logging.handlers.RotatingFileHandler', - 'filename': 'media/logs/main.log', - 'maxBytes': 1024 * 1024 * 15, - 'backupCount': 7, - 'formatter': 'verbose', - } - # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.0/howto/static-files/ From 798e0e7a923cf62329d33400f02f5baf83f8cc9e Mon Sep 17 00:00:00 2001 From: gzbender Date: Tue, 13 Aug 2019 18:11:32 +0300 Subject: [PATCH 5/5] =?UTF-8?q?=D0=BD=D0=B5=20=D0=BE=D1=82=D0=BF=D1=80?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D1=8F=D0=B5=D1=82=D1=81=D1=8F=20=D1=81=D1=82?= =?UTF-8?q?=D0=B0=D1=82=D0=B8=D1=81=D1=82=D0=B8=D0=BA=D0=B0=20roistat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/settings.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/project/settings.py b/project/settings.py index 42095f6a..3733327c 100644 --- a/project/settings.py +++ b/project/settings.py @@ -196,10 +196,9 @@ LOGGING = { 'class': 'logging.StreamHandler', 'formatter': 'verbose', }, - 'log_file': { - 'level': 'DEBUG', - 'class': 'logging.StreamHandler', - 'formatter': 'verbose', + 'sentry': { + 'level': 'WARNING', + 'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler', }, }, 'loggers': {