Files
mayan-edms/apps/common/middleware/strip_spaces_widdleware.py
Roberto Rosario 1b6806f7d1 PEP8 cleanups
2011-04-08 01:31:39 -04:00

10 lines
325 B
Python

# Aliasing it for the sake of page size.
from django.utils.html import strip_spaces_between_tags as short
class SpacelessMiddleware(object):
def process_response(self, request, response):
if 'text/html' in response['Content-Type']:
response.content = short(response.content)
return response