app/django/views/decorators/gzip.py
author Sverre Rabbelier <srabbelier@gmail.com>
Wed, 04 Mar 2009 23:11:33 +0000
changeset 1672 9b6cc71dd70c
parent 54 03e267d67478
permissions -rw-r--r--
Only show key_fields in error message This caused a crash when GET, POST, and context were added to the django_args by the decorators. 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)