1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #2109 -- Convert old-style classes to new-style classes throughout Django. Thanks, Nicola Larosa

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty
2006-06-08 05:00:13 +00:00
parent 5edd1335b2
commit 2abfd5dd58
33 changed files with 63 additions and 64 deletions

View File

@@ -3,7 +3,7 @@ from django.core.cache import cache
from django.utils.cache import get_cache_key, learn_cache_key, patch_response_headers
from django.http import HttpResponseNotModified
class CacheMiddleware:
class CacheMiddleware(object):
"""
Cache middleware. If this is enabled, each Django-powered page will be
cached for CACHE_MIDDLEWARE_SECONDS seconds. Cache is based on URLs.

View File

@@ -3,7 +3,7 @@ from django import http
from django.core.mail import mail_managers
import md5, os
class CommonMiddleware:
class CommonMiddleware(object):
"""
"Common" middleware for taking care of some basic operations:

View File

@@ -1,7 +1,7 @@
from django.conf import settings
from django import http
class XViewMiddleware:
class XViewMiddleware(object):
"""
Adds an X-View header to internal HEAD requests -- used by the documentation system.
"""

View File

@@ -4,7 +4,7 @@ from django.utils.cache import patch_vary_headers
re_accepts_gzip = re.compile(r'\bgzip\b')
class GZipMiddleware:
class GZipMiddleware(object):
"""
This middleware compresses content if the browser allows gzip compression.
It sets the Vary header accordingly, so that caches will base their storage

View File

@@ -1,6 +1,6 @@
import datetime
class ConditionalGetMiddleware:
class ConditionalGetMiddleware(object):
"""
Handles conditional GET operations. If the response has a ETag or
Last-Modified header, and the request has If-None-Match or

View File

@@ -3,7 +3,7 @@
from django.utils.cache import patch_vary_headers
from django.utils import translation
class LocaleMiddleware:
class LocaleMiddleware(object):
"""
This is a very simple middleware that parses a request
and decides what translation object to install in the current

View File

@@ -1,7 +1,7 @@
from django.conf import settings
from django.db import transaction
class TransactionMiddleware:
class TransactionMiddleware(object):
"""
Transaction middleware. If this is enabled, each view function will be run
with commit_on_response activated - that way a save() doesn't do a direct