app/django/views/decorators/gzip.py
author Daniel Bentley <dbentley@google.com>
Sun, 12 Apr 2009 06:24:14 +0000
changeset 2167 91e622242f2d
parent 54 03e267d67478
permissions -rw-r--r--
Respond to comments on r2769. Patch by: Dan Bentley
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
54
03e267d67478 Major reorganization of the soc svn repo, to merge into a single App Engine
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     1
"Decorator for views that gzips pages if the client supports it."
03e267d67478 Major reorganization of the soc svn repo, to merge into a single App Engine
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     2
03e267d67478 Major reorganization of the soc svn repo, to merge into a single App Engine
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     3
from django.utils.decorators import decorator_from_middleware
03e267d67478 Major reorganization of the soc svn repo, to merge into a single App Engine
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     4
from django.middleware.gzip import GZipMiddleware
03e267d67478 Major reorganization of the soc svn repo, to merge into a single App Engine
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     5
03e267d67478 Major reorganization of the soc svn repo, to merge into a single App Engine
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     6
gzip_page = decorator_from_middleware(GZipMiddleware)