From 668c9485d083c4982a316b1233b161694fffe691 Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Thu, 2 Mar 2017 13:44:04 -0600 Subject: [PATCH] Add rollbar (#37) --- bikeshop_project/bikeshop/settings/production.py | 14 ++++++++++++++ requirements/production.txt | 1 + 2 files changed, 15 insertions(+) diff --git a/bikeshop_project/bikeshop/settings/production.py b/bikeshop_project/bikeshop/settings/production.py index 8f82509..e668e04 100644 --- a/bikeshop_project/bikeshop/settings/production.py +++ b/bikeshop_project/bikeshop/settings/production.py @@ -1,4 +1,7 @@ import sys + +import rollbar + from .base import * # noqa @@ -51,3 +54,14 @@ WEBPACK_LOADER = { # Covers regular testing and django-coverage if 'test' in sys.argv or 'test_coverage' in sys.argv: DATABASES['default']['ENGINE'] = 'django.db.backends.sqlite3' # noqa + +MIDDLEWARE_CLASSES += ['rollbar.contrib.django.middleware.RollbarNotifierMiddleware'] + +ROLLBAR = { + 'access_token': '91808a727b9a4679a89720132071391a', + 'environment': 'production', + 'root': BASE_DIR, +} + +rollbar.init(**ROLLBAR) + diff --git a/requirements/production.txt b/requirements/production.txt index e658cfd..6b2166d 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -1,3 +1,4 @@ -r base.txt -r testing.txt gunicorn==19.4.5 +rollbar==0.13.11