app/django/views/decorators/gzip.py
author Sverre Rabbelier <srabbelier@gmail.com>
Fri, 13 Feb 2009 21:52:10 +0000
changeset 1301 58f18ea60093
parent 54 03e267d67478
permissions -rw-r--r--
Added a filter_fields parameter to the ReferenceField widget This paramater makes it possible to do 'hard coded' filtering. 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)