diff --git a/settings.py b/settings.py index 14d60d9..a917527 100644 --- a/settings.py +++ b/settings.py @@ -101,6 +101,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( ) MIDDLEWARE_CLASSES = ( + 'bugsnag.django.middleware.BugsnagMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', @@ -222,6 +223,12 @@ else: # API TASTYPIE_CANNED_ERROR = "There was an error with your request. The site developers have a record of this error, please email api@snipt.net and we'll help you out." +# Bugsnag +BUGSNAG = { + "api_key": "", + "project_root": PROJECT_PATH, +} + # Extensions if DEBUG: INSTALLED_APPS += ('django_extensions',) diff --git a/urls.py b/urls.py index 52a0bc3..20f1a50 100644 --- a/urls.py +++ b/urls.py @@ -1,5 +1,5 @@ from views import (amazon_search, amazon_image, lexers, pro_signup, - sitemap, tags, pro_signup_complete, stats) + sitemap, tags, pro_signup_complete, stats, test) from django.conf.urls.defaults import include, patterns, url from django.views.generic.simple import direct_to_template from utils.forms import SniptRegistrationForm @@ -37,6 +37,8 @@ urlpatterns = patterns('', url(r'^sitemap.xml$', sitemap), url(r'^tags/$', tags), + url(r'^test/$', test), + url(r'^pro/$', direct_to_template, {'template': 'pro.html'}), url(r'^pro/signup/$', pro_signup), url(r'^pro/signup/complete/$', pro_signup_complete), diff --git a/views.py b/views.py index f31efe7..5de643f 100644 --- a/views.py +++ b/views.py @@ -166,3 +166,11 @@ def tags(request): 'all_tags': all_tags, 'tags': popular_tags } + +@render_to('tags.html') +def test(request): + + # Bugsnag test. + assert False + + return {}