mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #24149 -- Normalized tuple settings to lists.
This commit is contained in:
parent
570912a97d
commit
9ec8aa5e5d
120 changed files with 612 additions and 616 deletions
|
@ -132,8 +132,8 @@ handler* -- a small class that handles file data as it gets uploaded. Upload
|
|||
handlers are initially defined in the :setting:`FILE_UPLOAD_HANDLERS` setting,
|
||||
which defaults to::
|
||||
|
||||
("django.core.files.uploadhandler.MemoryFileUploadHandler",
|
||||
"django.core.files.uploadhandler.TemporaryFileUploadHandler",)
|
||||
["django.core.files.uploadhandler.MemoryFileUploadHandler",
|
||||
"django.core.files.uploadhandler.TemporaryFileUploadHandler"]
|
||||
|
||||
Together :class:`MemoryFileUploadHandler` and
|
||||
:class:`TemporaryFileUploadHandler` provide Django's default file upload
|
||||
|
|
|
@ -20,21 +20,21 @@ Activating middleware
|
|||
=====================
|
||||
|
||||
To activate a middleware component, add it to the
|
||||
:setting:`MIDDLEWARE_CLASSES` tuple in your Django settings.
|
||||
:setting:`MIDDLEWARE_CLASSES` list in your Django settings.
|
||||
|
||||
In :setting:`MIDDLEWARE_CLASSES`, each middleware component is represented by
|
||||
a string: the full Python path to the middleware's class name. For example,
|
||||
here's the default value created by :djadmin:`django-admin startproject
|
||||
<startproject>`::
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
MIDDLEWARE_CLASSES = [
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
)
|
||||
]
|
||||
|
||||
A Django installation doesn't require any middleware —
|
||||
:setting:`MIDDLEWARE_CLASSES` can be empty, if you'd like — but it's strongly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue