app/django/views/decorators/gzip.py
author Lennard de Rijk <ljvderijk@gmail.com>
Thu, 23 Jul 2009 14:55:29 +0200
changeset 2668 7fd0951332ef
parent 54 03e267d67478
permissions -rw-r--r--
Use role_name where needed for creating/handling requests. Also added TODO to extend the redirect for further use with the new module system.

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