app/django/views/decorators/gzip.py
author Sverre Rabbelier <srabbelier@gmail.com>
Thu, 16 Oct 2008 18:08:35 +0000
changeset 362 d904f4a76f6f
parent 54 03e267d67478
permissions -rw-r--r--
entity_type is not the same as entity_type_short The previous commit wrongfully assumed this. Patch by: Sverre Rabbelier Reviewed by: to-be-reviewed

"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)