From c9cfd9c980bf202f7ef31287b7d1c9916db9e09f Mon Sep 17 00:00:00 2001 From: Slava Kyrachevsky Date: Mon, 6 Feb 2017 14:45:10 +0200 Subject: [PATCH] =?UTF-8?q?=D0=B2=D1=8B=D0=BD=D0=B5=D1=81=20sentry=20?= =?UTF-8?q?=D0=B2=20=D0=BB=D0=BE=D0=BA=D0=B0=D0=BB=D1=8C=D0=BD=D1=8B=D0=B5?= =?UTF-8?q?=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 19 ++++++++++++++++++- proj/settings.py | 41 ----------------------------------------- 2 files changed, 18 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 6abe0b44..7e0fa3c7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,24 @@ Expomap project -### proj/local.py EXAMPLE +### proj/local.py PRODUCTION EXAMPLE +```python +# -*- coding: utf-8 -*- +from settings import * + +DEBUG = False + +INSTALLED_APPS += ( + 'raven.contrib.django.raven_compat', +) +RAVEN_CONFIG = { + 'dsn': 'http://474617c96350412d80735900c6717b9a:330285c9034947a181cbae8b52bb15d8@88.198.17.35:9000/3', + 'release': raven.fetch_git_sha(os.path.dirname(os.pardir)), +} +``` + + +### proj/local.py DEV EXAMPLE ```python # -*- coding: utf-8 -*- from settings import * diff --git a/proj/settings.py b/proj/settings.py index b314c31c..54b9f09c 100644 --- a/proj/settings.py +++ b/proj/settings.py @@ -399,7 +399,6 @@ INSTALLED_APPS = ( 'south', 'rosetta', 'widget_tweaks', - 'raven.contrib.django.raven_compat', ) CRONJOBS = [ @@ -526,47 +525,7 @@ PERIODIC = { 9: _(u'Раз в 5 лет') } -# sentry -RAVEN_CONFIG = { - 'dsn': 'http://474617c96350412d80735900c6717b9a:330285c9034947a181cbae8b52bb15d8@88.198.17.35:9000/3', - 'release': raven.fetch_git_sha(os.path.dirname(os.pardir)), -} - try: from proj.local import * except ImportError, e: pass - -# logging -U_LOGFILE_SIZE = 1 * 1024 * 1024 -U_LOGFILE_COUNT = 2 -DEFAULT_LOGGER_NAME = 'django' -LOGGING = { - 'version': 1, - 'disable_existing_loggers': False, - 'formatters': { - 'verbose': { - 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s \n' - }, - 'simple': { - 'format': '%(levelname)s %(message)s' - }, - }, - 'handlers': { - 'file': { - 'level': 'INFO', - 'filename': os.path.join(SITE_ROOT, 'logs/django.log'), - 'formatter': 'verbose', - 'class':'logging.handlers.RotatingFileHandler', - 'maxBytes': U_LOGFILE_SIZE, - 'backupCount': U_LOGFILE_COUNT, - }, - }, - 'loggers': { - 'django': { - 'handlers': ['file'], - 'propagate': True, - 'level': 'DEBUG', - }, - } -}