Commit 41fced3d by Austin Pua

Added compatibility for Django 1.10 new style middleware

parent 50d4b2c9
......@@ -6,8 +6,14 @@ from django.utils.html import strip_spaces_between_tags as minify_html
from pipeline.conf import settings
try:
# Support for Django 1.10 new MIDDLEWARE setting
from django.utils.deprecation import MiddlewareMixin
except ImportError: # Django < 1.10
MiddlewareMixin = object
class MinifyHTMLMiddleware(object):
class MinifyHTMLMiddleware(MiddlewareMixin):
def __init__(self):
if not settings.PIPELINE_ENABLED:
raise MiddlewareNotUsed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment