app/django/views/decorators/gzip.py
author Sverre Rabbelier <srabbelier@gmail.com>
Thu, 12 Mar 2009 21:38:07 +0000
changeset 1812 a0ab93cc3cd5
parent 54 03e267d67478
permissions -rw-r--r--
Strip leading and trailing newlines from our responses Without this CSV exports look funny. Patch by: Sverre Rabbelier

"Decorator for views that gzips pages if the client supports it."

from django.utils.decorators import decorator_from_middleware
from django.middleware.gzip import GZipMiddleware

gzip_page = decorator_from_middleware(GZipMiddleware)