old_contents: from honeybadger import honeybadger
  
  class DjangoHoneybadgerMiddleware(object):
      def __init__(self):
          from django.conf import settings
          config_kwargs = dict([(k.lower(), v) for k, v in getattr(settings, 'HONEYBADGER', {}).items()])
          honeybadger.configure(**config_kwargs)
  
      def process_request(self, request):
          honeybadger.begin_request(request)
          return None
  
      def process_exception(self, request, exception):
          honeybadger.notify(exception)
          return None
  
      def process_response(self, request, response):
          honeybadger.reset_context()
          return response
  
  # TODO: finish Flask support
  class FlaskHoneybadgerMiddleware(object):
      def __init__(self, app, **kwargs):
          raise NotImplemented
          # return app
  
new_contents: from honeybadger import honeybadger
  
  class DjangoHoneybadgerMiddleware(object):
      def __init__(self):
          from django.conf import settings
          config_kwargs = dict([(k.lower(), v) for k, v in getattr(settings, 'HONEYBADGER', {}).items()])
          honeybadger.configure(**config_kwargs)
          honeybadger.config.set_12factor_config() # environment should override Django settings
  
      def process_request(self, request):
          honeybadger.begin_request(request)
          return None
  
      def process_exception(self, request, exception):
          honeybadger.notify(exception)
          return None
  
      def process_response(self, request, response):
          honeybadger.reset_context()
          return response
  
  # TODO: finish Flask support
  class FlaskHoneybadgerMiddleware(object):
      def __init__(self, app, **kwargs):
          raise NotImplemented
          # return app
  
subject: Update Django middleware so it applies 12-factor config *after* it applies Django config, to ensure 12-factor overrides Django settings. (fixes #7)