Skip to content
This repository has been archived by the owner on Nov 3, 2019. It is now read-only.

Commit

Permalink
Use rollbar to track exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
passuf committed Apr 5, 2017
1 parent c10d72f commit 5c35a24
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ requests==2.13.0
django-bootstrap3==8.2.2
gunicorn==19.7.1
habitica==0.0.16
rollbar==0.13.11
10 changes: 10 additions & 0 deletions wunderhabit/local_settings.example.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import rollbar


BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Expand Down Expand Up @@ -34,3 +35,12 @@
EMAIL_PORT = 587
EMAIL_USE_TLS = True


# Rollbar Settings
ROLLBAR = {
'access_token': 'POST_SERVER_ITEM_ACCESS_TOKEN',
'environment': 'development',
'branch': 'master',
'root': BASE_DIR,
}
rollbar.init(**ROLLBAR)
3 changes: 2 additions & 1 deletion wunderhabit/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
'wh_habitica',
]

MIDDLEWARE_CLASSES = [
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
Expand All @@ -56,6 +56,7 @@
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'rollbar.contrib.django.middleware.RollbarNotifierMiddleware',
]

ROOT_URLCONF = 'wunderhabit.urls'
Expand Down

0 comments on commit 5c35a24

Please sign in to comment.