mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[1.11.x] Fixed #28548 -- Replaced 'middlewares' with 'middleware' in docs.
Backport of da3a5cee4f from master
			
			
This commit is contained in:
		| @@ -147,7 +147,7 @@ can do all of the work. | |||||||
| Note that the order of :setting:`MIDDLEWARE` matters. Generally, you can put | Note that the order of :setting:`MIDDLEWARE` matters. Generally, you can put | ||||||
| :class:`~django.contrib.flatpages.middleware.FlatpageFallbackMiddleware` at the | :class:`~django.contrib.flatpages.middleware.FlatpageFallbackMiddleware` at the | ||||||
| end of the list. This means it will run first when processing the response, and | end of the list. This means it will run first when processing the response, and | ||||||
| ensures that any other response-processing middlewares see the real flatpage | ensures that any other response-processing middleware see the real flatpage | ||||||
| response rather than the 404. | response rather than the 404. | ||||||
|  |  | ||||||
| For more on middleware, read the :doc:`middleware docs | For more on middleware, read the :doc:`middleware docs | ||||||
|   | |||||||
| @@ -1039,7 +1039,7 @@ with the following notable differences: | |||||||
| :class:`StreamingHttpResponse` should only be used in situations where it is | :class:`StreamingHttpResponse` should only be used in situations where it is | ||||||
| absolutely required that the whole content isn't iterated before transferring | absolutely required that the whole content isn't iterated before transferring | ||||||
| the data to the client. Because the content can't be accessed, many | the data to the client. Because the content can't be accessed, many | ||||||
| middlewares can't function normally. For example the ``ETag`` and | middleware can't function normally. For example the ``ETag`` and | ||||||
| ``Content-Length`` headers can't be generated for streaming responses. | ``Content-Length`` headers can't be generated for streaming responses. | ||||||
|  |  | ||||||
| Attributes | Attributes | ||||||
|   | |||||||
| @@ -476,7 +476,6 @@ metre | |||||||
| MiB | MiB | ||||||
| micrometre | micrometre | ||||||
| middleware | middleware | ||||||
| middlewares |  | ||||||
| migrationname | migrationname | ||||||
| millimetre | millimetre | ||||||
| Minification | Minification | ||||||
|   | |||||||
| @@ -2117,7 +2117,7 @@ To use ``LocaleMiddleware``, add ``'django.middleware.locale.LocaleMiddleware'`` | |||||||
| to your :setting:`MIDDLEWARE` setting. Because middleware order matters, follow | to your :setting:`MIDDLEWARE` setting. Because middleware order matters, follow | ||||||
| these guidelines: | these guidelines: | ||||||
|  |  | ||||||
| * Make sure it's one of the first middlewares installed. | * Make sure it's one of the first middleware installed. | ||||||
| * It should come after ``SessionMiddleware``, because ``LocaleMiddleware`` | * It should come after ``SessionMiddleware``, because ``LocaleMiddleware`` | ||||||
|   makes use of session data. And it should come before ``CommonMiddleware`` |   makes use of session data. And it should come before ``CommonMiddleware`` | ||||||
|   because ``CommonMiddleware`` needs an activated language in order |   because ``CommonMiddleware`` needs an activated language in order | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user