app/django/views/decorators/gzip.py
author Pawel Solyga <Pawel.Solyga@gmail.com>
Fri, 17 Apr 2009 22:50:16 +0000
changeset 2200 a1a7c262235d
parent 54 03e267d67478
permissions -rw-r--r--
Add proper generation of Student entities and StudentProposal entities to seed_db module. Add link for generating 200 Students to seed_db.html template. Patch by: Pawel Solyga 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)