app/django/views/decorators/gzip.py
author Lennard de Rijk <ljvderijk@gmail.com>
Sun, 01 Feb 2009 17:52:12 +0000
changeset 1161 ad352f3a37d3
parent 54 03e267d67478
permissions -rw-r--r--
This patch prohibits changing of agreed_to_tos and agreed_to_tos_on by the Logic module. This is used so that legally the agreed_to_tos fields can never change in the User model once set. Patch by: Haoyu Bai Reviewed by: Lennard de Rijk

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