Merge branch 'master' of gitlab.com:lilschool/site into feature/packages-page-1-08-19

remotes/origin/feature/packages-page-1-08-19
gzbender 7 years ago
commit c615bd1533
  1. 20
      project/settings.py
  2. 7
      project/templates/blocks/lil_store_js.html
  3. 11
      project/templates/lilcity/layer.html

@ -196,11 +196,9 @@ LOGGING = {
'class': 'logging.StreamHandler', 'class': 'logging.StreamHandler',
'formatter': 'verbose', 'formatter': 'verbose',
}, },
'log_file': { 'sentry': {
'level': 'DEBUG', 'level': 'WARNING',
'filters': ['require_debug_true'], 'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler',
'class': 'logging.StreamHandler',
'formatter': 'verbose',
}, },
}, },
'loggers': { 'loggers': {
@ -216,22 +214,12 @@ LOGGING = {
'handlers': ['console', ], 'handlers': ['console', ],
}, },
'': { '': {
'handlers': ['console', 'log_file',], 'handlers': ['sentry',],
'level': "INFO", '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, # 5 MB
'backupCount': 7,
'formatter': 'verbose',
'filters': ['require_debug_false'],
}
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.0/howto/static-files/ # https://docs.djangoproject.com/en/2.0/howto/static-files/

@ -39,12 +39,13 @@
isGiftCertificateUrl: {{ is_gift_certificate_url|yesno:"true,false" }}, isGiftCertificateUrl: {{ is_gift_certificate_url|yesno:"true,false" }},
}, },
data: {}, data: {},
urlIs: (urlPatternNames) => { urlIs: function(urlPatternNames) {
if(! Array.isArray(urlPatternNames)){ if(! Array.isArray(urlPatternNames)){
urlPatternNames = [urlPatternNames]; urlPatternNames = [urlPatternNames];
} }
return urlPatternNames.filter( return urlPatternNames.filter(function(urlPatternName){
urlPatternName => window.location.pathname.search(window.LIL_STORE.urls[urlPatternName]) > -1).length > 0; return window.location.pathname.search(window.LIL_STORE.urls[urlPatternName]) > -1;
}).length > 0;
}, },
isIndexPage: window.location.pathname == '/', isIndexPage: window.location.pathname == '/',
}; };

@ -48,6 +48,12 @@
} }
</script> </script>
{% block layer_head %}{% endblock layer_head %}
</head>
<body>
{% block layer_body %}
{% endblock layer_body %}
<!-- Facebook Pixel Code --> <!-- Facebook Pixel Code -->
<script> <script>
!function(f,b,e,v,n,t,s) !function(f,b,e,v,n,t,s)
@ -106,10 +112,5 @@
<noscript><div><img src="https://mc.yandex.ru/watch/49354039" style="position:absolute; left:-9999px;" alt="" /></div></noscript> <noscript><div><img src="https://mc.yandex.ru/watch/49354039" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter --> <!-- /Yandex.Metrika counter -->
{% include "templates/blocks/mixpanel.html" %} {% include "templates/blocks/mixpanel.html" %}
{% block layer_head %}{% endblock layer_head %}
</head>
<body>
{% block layer_body %}
{% endblock layer_body %}
</body> </body>
</html> </html>

Loading…
Cancel
Save