app/django/views/decorators/gzip.py
author Madhusudan.C.S <madhusudancs@gmail.com>
Sat, 22 Aug 2009 03:56:04 +0530
changeset 2782 3944749338d3
parent 54 03e267d67478
permissions -rw-r--r--
Dotted path to the views in URL patterns is changed to a params parameter. This change makes the URL mapping from URL to View method in patterns generic where the base package path is taken from the params['module_package'] value to support module system of Melange where inherited View classes override the params['module_package'] value to specify their own View methods.
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)