old_contents: from django.utils.deprecation import MiddlewareMixin
  
  from subdomains.middleware import SubdomainURLRoutingMiddleware
  from debug_toolbar.middleware import DebugToolbarMiddleware
  
  
  class PatchedSubdomainURLRoutingMiddleware(MiddlewareMixin,
                                             SubdomainURLRoutingMiddleware):
      pass
  
  
  class PatchedDebugToolbarMiddleware(MiddlewareMixin, DebugToolbarMiddleware):
      pass
  
new_contents: from django.utils.deprecation import MiddlewareMixin
  from django.conf import settings
  
  from subdomains.middleware import SubdomainURLRoutingMiddleware
  
  
  class PatchedSubdomainURLRoutingMiddleware(MiddlewareMixin,
                                             SubdomainURLRoutingMiddleware):
      pass
  
  
  if settings.DEBUG:
      from debug_toolbar.middleware import DebugToolbarMiddleware
  
      class PatchedDebugToolbarMiddleware(MiddlewareMixin,
                                          DebugToolbarMiddleware):
          pass
  
subject: Fix debug toolbar in prod issue (#17)