pipeline.middleware.MinifyHTMLMiddleware not working with Django 2.0.8
Hi,
I installed the latest version of django-pipeline==1.6.14 with Django 2.0.8 and get an exception while using pipeline.middleware.MinifyHTMLMiddleware.
File "/home/.3.5/site-packages/django/core/handlers/base.py", line 36, in load_middleware for middleware_path in reversed(settings.MIDDLEWARE): TypeError: argument to reversed() must be a sequence
Can someone confirm this bug?
Thx
This error is not related to django-pipeline.
Check your settings.py file for MIDDLEWARE definition, it should be a list of strings. e.g:
MIDDLEWARE = [
'pipeline.middleware.MinifyHTMLMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
]
It worked for me with Django 2.0.8 but now I updated to 2.1.15 and MinifyHTMLMiddleware breaks my code. It returns the output as a string.
Example: I see the correct output of my template, but it is returned as a string with b' my template as string'