Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
attempt to hack opbeat middleware to work with django 1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
monty5811 committed Aug 12, 2016
1 parent 06d6682 commit 1997d8a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions apostello/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
from django.core.cache import cache
from django.http import HttpResponseRedirect
from django.utils.deprecation import MiddlewareMixin
from opbeat.contrib.django.middleware import OpbeatAPMMiddleware


class TempOpbeatMiddleware(MiddlewareMixin, OpbeatAPMMiddleware):
pass


class FirstRunRedirect(MiddlewareMixin):
Expand Down Expand Up @@ -45,3 +50,4 @@ def process_template_response(self, request, response):

response.context_data['js_path'] = template_name.replace('.html', '')
return response

3 changes: 2 additions & 1 deletion settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
INSTALLED_APPS += ['opbeat.contrib.django', ]

MIDDLEWARE = [
'opbeat.contrib.django.middleware.OpbeatAPMMiddleware',
# 'opbeat.contrib.django.middleware.OpbeatAPMMiddleware',
'apostello.middleware.TempOpbeatMiddleware',
] + MIDDLEWARE

LOGGING['handlers']['opbeat'] = {
Expand Down

0 comments on commit 1997d8a

Please sign in to comment.