Ticket #1998: single-quotes-plus-docs.diff

File single-quotes-plus-docs.diff, 5.4 KB (added by nirvdrum, 18 years ago)

Same as single-quotes.diff but updates the django documentation as well

  • django/conf/global_settings.py

     
    219219# this middleware classes will be applied in the order given, and in the
    220220# response phase the middleware will be applied in reverse order.
    221221MIDDLEWARE_CLASSES = (
    222     "django.contrib.sessions.middleware.SessionMiddleware",
    223     "django.contrib.auth.middleware.AuthenticationMiddleware",
    224 #     "django.middleware.http.ConditionalGetMiddleware",
    225 #     "django.middleware.gzip.GZipMiddleware",
    226     "django.middleware.common.CommonMiddleware",
    227     "django.middleware.doc.XViewMiddleware",
     222    'django.contrib.sessions.middleware.SessionMiddleware',
     223    'django.contrib.auth.middleware.AuthenticationMiddleware',
     224#     'django.middleware.http.ConditionalGetMiddleware',
     225#     'django.middleware.gzip.GZipMiddleware',
     226    'django.middleware.common.CommonMiddleware',
     227    'django.middleware.doc.XViewMiddleware',
    228228)
    229229
    230230############
  • django/conf/project_template/settings.py

     
    5151)
    5252
    5353MIDDLEWARE_CLASSES = (
    54     "django.middleware.common.CommonMiddleware",
    55     "django.contrib.sessions.middleware.SessionMiddleware",
    56     "django.contrib.auth.middleware.AuthenticationMiddleware",
    57     "django.middleware.doc.XViewMiddleware",
     54    'django.middleware.common.CommonMiddleware',
     55    'django.contrib.sessions.middleware.SessionMiddleware',
     56    'django.contrib.auth.middleware.AuthenticationMiddleware',
     57    'django.middleware.doc.XViewMiddleware',
    5858)
    5959
    6060ROOT_URLCONF = '{{ project_name }}.urls'
  • docs/cache.txt

     
    209209==================
    210210
    211211Once the cache is set up, the simplest way to use caching is to cache your
    212 entire site. Just add ``django.middleware.cache.CacheMiddleware`` to your
     212entire site. Just add ``'django.middleware.cache.CacheMiddleware'`` to your
    213213``MIDDLEWARE_CLASSES`` setting, as in this example::
    214214
    215215    MIDDLEWARE_CLASSES = (
    216         "django.middleware.cache.CacheMiddleware",
    217         "django.middleware.common.CommonMiddleware",
     216        'django.middleware.cache.CacheMiddleware',
     217        'django.middleware.common.CommonMiddleware',
    218218    )
    219219
    220220(The order of ``MIDDLEWARE_CLASSES`` matters. See "Order of MIDDLEWARE_CLASSES"
  • docs/csrf.txt

     
    1717
    1818How to use it
    1919=============
    20 Add the middleware ``"django.contrib.csrf.middleware.CsrfMiddleware"`` to
     20Add the middleware ``'django.contrib.csrf.middleware.CsrfMiddleware'`` to
    2121your list of middleware classes, ``MIDDLEWARE_CLASSES``. It needs to process
    2222the response after the SessionMiddleware, so must come before it in the
    2323list. It also must process the response before things like compression
  • docs/middleware.txt

     
    2323``django-admin.py startproject``::
    2424
    2525    MIDDLEWARE_CLASSES = (
    26         "django.middleware.common.CommonMiddleware",
    27         "django.contrib.sessions.middleware.SessionMiddleware",
    28         "django.contrib.auth.middleware.AuthenticationMiddleware",
    29         "django.middleware.doc.XViewMiddleware",
     26        'django.middleware.common.CommonMiddleware',
     27        'django.contrib.sessions.middleware.SessionMiddleware',
     28        'django.contrib.auth.middleware.AuthenticationMiddleware',
     29        'django.middleware.doc.XViewMiddleware',
    3030    )
    3131
    3232Django applies middleware in the order it's defined in ``MIDDLEWARE_CLASSES``,
  • docs/sessions.txt

     
    1414
    1515Turn session functionality on and off by editing the ``MIDDLEWARE_CLASSES``
    1616setting. To activate sessions, make sure ``MIDDLEWARE_CLASSES`` contains
    17 ``"django.contrib.sessions.middleware.SessionMiddleware"``.
     17``'django.contrib.sessions.middleware.SessionMiddleware'``.
    1818
    1919The default ``settings.py`` created by ``django-admin.py startproject`` has
    2020``SessionMiddleware`` activated.
  • docs/transactions.txt

     
    3232your ``MIDDLEWARE_CLASSES`` setting::
    3333
    3434    MIDDLEWARE_CLASSES = (
    35         "django.contrib.sessions.middleware.SessionMiddleware",
    36         "django.middleware.common.CommonMiddleware",
    37         "django.middleware.cache.CacheMiddleware",
    38         "django.middleware.transaction.TransactionMiddleware",
     35        'django.contrib.sessions.middleware.SessionMiddleware',
     36        'django.middleware.common.CommonMiddleware',
     37        'django.middleware.cache.CacheMiddleware',
     38        'django.middleware.transaction.TransactionMiddleware',
    3939    )
    4040
    4141The order is quite important. The transaction middleware applies not only to
Back to Top