Loading django/conf/global_settings.py +6 −6 Original line number Diff line number Diff line Loading @@ -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', ) ############ Loading django/conf/project_template/settings.py +4 −4 Original line number Diff line number Diff line Loading @@ -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' Loading docs/cache.txt +3 −3 Original line number Diff line number Diff line Loading @@ -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" Loading docs/csrf.txt +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading docs/middleware.txt +4 −4 Original line number Diff line number Diff line Loading @@ -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``, Loading Loading
django/conf/global_settings.py +6 −6 Original line number Diff line number Diff line Loading @@ -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', ) ############ Loading
django/conf/project_template/settings.py +4 −4 Original line number Diff line number Diff line Loading @@ -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' Loading
docs/cache.txt +3 −3 Original line number Diff line number Diff line Loading @@ -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" Loading
docs/csrf.txt +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
docs/middleware.txt +4 −4 Original line number Diff line number Diff line Loading @@ -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``, Loading