Fixed #1998 -- Changed double quotes to single quotes
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2980 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
14392b032d
commit
be25b661b1
|
@ -219,12 +219,12 @@ TRANSACTIONS_MANAGED = False
|
|||
# this middleware classes will be applied in the order given, and in the
|
||||
# response phase the middleware will be applied in reverse order.
|
||||
MIDDLEWARE_CLASSES = (
|
||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
||||
# "django.middleware.http.ConditionalGetMiddleware",
|
||||
# "django.middleware.gzip.GZipMiddleware",
|
||||
"django.middleware.common.CommonMiddleware",
|
||||
"django.middleware.doc.XViewMiddleware",
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
# 'django.middleware.http.ConditionalGetMiddleware',
|
||||
# 'django.middleware.gzip.GZipMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.doc.XViewMiddleware',
|
||||
)
|
||||
|
||||
############
|
||||
|
|
|
@ -51,10 +51,10 @@ TEMPLATE_LOADERS = (
|
|||
)
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
"django.middleware.common.CommonMiddleware",
|
||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
||||
"django.middleware.doc.XViewMiddleware",
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.middleware.doc.XViewMiddleware',
|
||||
)
|
||||
|
||||
ROOT_URLCONF = '{{ project_name }}.urls'
|
||||
|
|
|
@ -209,12 +209,12 @@ The per-site cache
|
|||
==================
|
||||
|
||||
Once the cache is set up, the simplest way to use caching is to cache your
|
||||
entire site. Just add ``django.middleware.cache.CacheMiddleware`` to your
|
||||
entire site. Just add ``'django.middleware.cache.CacheMiddleware'`` to your
|
||||
``MIDDLEWARE_CLASSES`` setting, as in this example::
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
"django.middleware.cache.CacheMiddleware",
|
||||
"django.middleware.common.CommonMiddleware",
|
||||
'django.middleware.cache.CacheMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
)
|
||||
|
||||
(The order of ``MIDDLEWARE_CLASSES`` matters. See "Order of MIDDLEWARE_CLASSES"
|
||||
|
|
|
@ -17,7 +17,7 @@ middleware into your list of installed middleware.
|
|||
|
||||
How to use it
|
||||
=============
|
||||
Add the middleware ``"django.contrib.csrf.middleware.CsrfMiddleware"`` to
|
||||
Add the middleware ``'django.contrib.csrf.middleware.CsrfMiddleware'`` to
|
||||
your list of middleware classes, ``MIDDLEWARE_CLASSES``. It needs to process
|
||||
the response after the SessionMiddleware, so must come before it in the
|
||||
list. It also must process the response before things like compression
|
||||
|
|
|
@ -23,10 +23,10 @@ name. For example, here's the default ``MIDDLEWARE_CLASSES`` created by
|
|||
``django-admin.py startproject``::
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
"django.middleware.common.CommonMiddleware",
|
||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
||||
"django.middleware.doc.XViewMiddleware",
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.middleware.doc.XViewMiddleware',
|
||||
)
|
||||
|
||||
Django applies middleware in the order it's defined in ``MIDDLEWARE_CLASSES``,
|
||||
|
|
|
@ -14,7 +14,7 @@ Sessions are implemented via middleware_.
|
|||
|
||||
Turn session functionality on and off by editing the ``MIDDLEWARE_CLASSES``
|
||||
setting. To activate sessions, make sure ``MIDDLEWARE_CLASSES`` contains
|
||||
``"django.contrib.sessions.middleware.SessionMiddleware"``.
|
||||
``'django.contrib.sessions.middleware.SessionMiddleware'``.
|
||||
|
||||
The default ``settings.py`` created by ``django-admin.py startproject`` has
|
||||
``SessionMiddleware`` activated.
|
||||
|
|
|
@ -32,10 +32,10 @@ To activate this feature, just add the ``TransactionMiddleware`` middleware to
|
|||
your ``MIDDLEWARE_CLASSES`` setting::
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||
"django.middleware.common.CommonMiddleware",
|
||||
"django.middleware.cache.CacheMiddleware",
|
||||
"django.middleware.transaction.TransactionMiddleware",
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.cache.CacheMiddleware',
|
||||
'django.middleware.transaction.TransactionMiddleware',
|
||||
)
|
||||
|
||||
The order is quite important. The transaction middleware applies not only to
|
||||
|
|
Loading…
Reference in New Issue