app/django/views/decorators/gzip.py
author Sverre Rabbelier <srabbelier@gmail.com>
Wed, 28 Jan 2009 02:27:25 +0000
changeset 1024 2a0ae6483825
parent 54 03e267d67478
permissions -rw-r--r--
Group dynamically generated menu items Also allow for grouping other views by setting the 'sidebar_grouping' param to a value another than 'main'. 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)