Ticket #16014: doc-patch-2.diff

File doc-patch-2.diff, 20.5 KB (added by psmith, 14 years ago)

A better version of the patch than doc-patch.diff

  • docs/intro/tutorial01.txt

     
    593593    Unicode string, and ``str(p)`` will return a normal string, with characters
    594594    encoded as UTF-8.
    595595
    596     If all of this is jibberish to you, just remember to add
     596    If all of this is gibberish to you, just remember to add
    597597    :meth:`~django.db.models.Model.__unicode__` methods to your models. With any
    598598    luck, things should Just Work for you.
    599599
  • docs/internals/svn.txt

     
    199199fixes, and shortly after the release of Django 1.1 the branch
    200200``django/branches/releases/1.1.X`` was created.
    201201
    202 Prior to the Django 1.0 release, these branches were maintaind within
     202Prior to the Django 1.0 release, these branches were maintained within
    203203the top-level ``django/branches`` directory, and so the following
    204204branches exist there and provided support for older Django releases:
    205205
  • docs/internals/contributing.txt

     
    472472    * Then, click the "Join this Team" button to become a member of this team.
    473473      Every team has at least one coordinator who is responsible to review
    474474      your membership request. You can of course also contact the team
    475       coordinator to clarify procedual problems and handle the actual
     475      coordinator to clarify procedural problems and handle the actual
    476476      translation process.
    477477
    478478    * Once you are a member of a team choose the translation resource you
  • docs/internals/deprecation.txt

     
    2020
    2121    * 1.4
    2222        * ``CsrfResponseMiddleware``.  This has been deprecated since the 1.2
    23           release, in favour of the template tag method for inserting the CSRF
     23          release, in favor of the template tag method for inserting the CSRF
    2424          token.  ``CsrfMiddleware``, which combines ``CsrfResponseMiddleware``
    2525          and ``CsrfViewMiddleware``, is also deprecated.
    2626
     
    129129
    130130        * The undocumented function
    131131          :func:`django.contrib.formtools.utils.security_hash`
    132           is deprecated, in favour of :func:`django.contrib.formtools.utils.form_hmac`
     132          is deprecated, in favor of :func:`django.contrib.formtools.utils.form_hmac`
    133133
    134134        * The function-based generic views have been deprecated in
    135135          favor of their class-based cousins. The following modules
     
    161161          a :class:`~django.contrib.gis.geos.GEOSException` when called
    162162          on a geometry with no SRID value.
    163163
    164         * :class:`~django.http.CompatCookie` will be removed in favour of
     164        * :class:`~django.http.CompatCookie` will be removed in favor of
    165165          :class:`~django.http.SimpleCookie`.
    166166
    167167        * :class:`django.core.context_processors.PermWrapper` and
  • docs/howto/jython.txt

     
    6565running on standard Python. However, are a few differences to keep in mind:
    6666
    6767    * Remember to use the ``jython`` command instead of ``python``. The
    68       documentation uses ``python`` for consistancy, but if you're using Jython
     68      documentation uses ``python`` for consistency, but if you're using Jython
    6969      you'll want to mentally replace ``python`` with ``jython`` every time it
    7070      occurs.
    7171
  • docs/howto/custom-template-tags.txt

     
    894894.. admonition:: Variable scope in context
    895895
    896896    Any variable set in the context will only be available in the same ``block``
    897     of the template in which it was assigned. This behaviour is intentional;
     897    of the template in which it was assigned. This behavior is intentional;
    898898    it provides a scope for variables so that they don't conflict with
    899899    context in other blocks.
    900900
  • docs/howto/custom-management-commands.txt

     
    7171<poll_id>``.
    7272
    7373The ``handle()`` method takes zero or more ``poll_ids`` and sets ``poll.opened``
    74 to ``False`` for each one. If the user referenced any nonexistant polls, a
     74to ``False`` for each one. If the user referenced any nonexistent polls, a
    7575:class:`CommandError` is raised. The ``poll.opened`` attribute does not exist
    7676in the :doc:`tutorial</intro/tutorial01>` and was added to
    7777``polls.models.Poll`` for this example.
  • docs/howto/static-files.txt

     
    137137directly in your templates. This means that a switch of static files servers
    138138only requires changing that single value. Much better!
    139139
    140 ``staticfiles`` inludes two built-in ways of getting at this setting in your
     140``staticfiles`` includes two built-in ways of getting at this setting in your
    141141templates: a context processor and a template tag.
    142142
    143143With a context processor
     
    170170every template. However, context processors require that you use
    171171:class:`~django.template.RequestContext` when rendering templates. This happens
    172172automatically if you're using a :doc:`generic view </ref/class-based-views>`,
    173 but in views written by hand you'll need to explicitally use ``RequestContext``
     173but in views written by hand you'll need to explicitly use ``RequestContext``
    174174To see how that works, and to read more details, check out
    175175:ref:`subclassing-context-requestcontext`.
    176176
     
    439439
    440440Once that's done, all you have to do is run :djadmin:`collectstatic` and your
    441441static files would be pushed through your storage package up to S3. If you
    442 later needed to swich to a different storage provider, it could be as simple
     442later needed to switch to a different storage provider, it could be as simple
    443443as changing your :setting:`STATICFILES_STORAGE` setting.
    444444
    445445For details on how you'd write one of these backends,
  • docs/howto/error-reporting.txt

     
    4444   .. versionadded:: 1.3
    4545
    4646   Server error emails are sent using the logging framework, so you can
    47    customize this behaviour by :doc:`customizing your logging configuration
     47   customize this behavior by :doc:`customizing your logging configuration
    4848   </topics/logging>`.
    4949
    5050404 errors
  • docs/topics/auth.txt

     
    283283        The :attr:`~django.contrib.auth.models.User.username` and
    284284        :attr:`~django.contrib.auth.models.User.password` are set as given. The
    285285        domain portion of :attr:`~django.contrib.auth.models.User.email` is
    286         automatically convered to lowercase, and the returned
     286        automatically converted to lowercase, and the returned
    287287        :class:`~django.contrib.auth.models.User` object will have
    288288        :attr:`~models.User.is_active` set to ``True``.
    289289
     
    12441244:ref:`model Meta attribute <meta-options>`.
    12451245
    12461246This example Task model creates three custom permissions, i.e., actions users
    1247 can or cannot do with Task instances, specific to your appication::
     1247can or cannot do with Task instances, specific to your application::
    12481248
    12491249    class Task(models.Model):
    12501250        ...
  • docs/topics/http/shortcuts.txt

     
    44
    55.. module:: django.shortcuts
    66   :synopsis:
    7        Convience shortcuts that spam multiple levels of Django's MVC stack.
     7       Convenience shortcuts that spam multiple levels of Django's MVC stack.
    88
    99.. index:: shortcuts
    1010
  • docs/topics/cache.txt

     
    615615:ref:`respect the active language<i18n-cache-key>`. For the ``cache`` template
    616616tag you could use one of the
    617617:ref:`translation-specific variables<template-translation-vars>` available in
    618 templates to archieve the same result:
     618templates to achieve the same result:
    619619
    620620.. code-block:: html+django
    621621
     
    843843    # Version 2 isn't available, either
    844844    >>> cache.get('my_key', version=2)
    845845    None
    846     # But version 3 *is* availble
     846    # But version 3 *is* available
    847847    >>> cache.get('my_key', version=3)
    848848    'hello world!'
    849849
  • docs/topics/db/models.txt

     
    188188
    189189        ::
    190190
    191             >>> p = Person(name="Fred Flinstone", gender="M")
     191            >>> p = Person(name="Fred Flintstone", gender="M")
    192192            >>> p.save()
    193193            >>> p.gender
    194194            u'M'
     
    791791 2. If you're subclassing an existing model (perhaps something from another
    792792    application entirely) and want each model to have its own database table,
    793793    :ref:`multi-table-inheritance` is the way to go.
    794  3. Finally, if you only want to modify the Python-level behaviour of a model,
     794 3. Finally, if you only want to modify the Python-level behavior of a model,
    795795    without changing the models fields in any way, you can use
    796796    :ref:`proxy-models`.
    797797
     
    12181218from that base class.
    12191219
    12201220Overriding fields in a parent model leads to difficulties in areas such as
    1221 initialising new instances (specifying which field is being initialized in
     1221initializing new instances (specifying which field is being initialized in
    12221222``Model.__init__``) and serialization. These are features which normal Python
    12231223class inheritance doesn't have to deal with in quite the same way, so the
    12241224difference between Django model inheritance and Python class inheritance isn't
  • docs/topics/db/optimization.txt

     
    9393Use the ``with`` template tag
    9494-----------------------------
    9595
    96 To make use of the caching behaviour of ``QuerySet``, you may need to use the
     96To make use of the caching behavior of ``QuerySet``, you may need to use the
    9797:ttag:`with` template tag.
    9898
    9999Use ``iterator()``
    100100------------------
    101101
    102 When you have a lot of objects, the caching behaviour of the ``QuerySet`` can
     102When you have a lot of objects, the caching behavior of the ``QuerySet`` can
    103103cause a large amount of memory to be used. In this case,
    104104:meth:`~django.db.models.QuerySet.iterator()` may help.
    105105
     
    252252
    253253Note, however, that these bulk update methods cannot call the ``save()`` or
    254254``delete()`` methods of individual instances, which means that any custom
    255 behaviour you have added for these methods will not be executed, including
     255behavior you have added for these methods will not be executed, including
    256256anything driven from the normal database object :doc:`signals </ref/signals>`.
    257257
    258258Use foreign key values directly
  • docs/topics/db/aggregation.txt

     
    233233publisher; the second query will only include good books in the annotated
    234234count. In the first query, the annotation precedes the filter, so the
    235235filter has no effect on the annotation. In the second query, the filter
    236 preceeds the annotation, and as a result, the filter constrains the objects
     236precedes the annotation, and as a result, the filter constrains the objects
    237237considered when calculating the annotation.
    238238
    239239``order_by()``
  • docs/topics/db/transactions.txt

     
    234234actually do anything.
    235235
    236236Savepoints aren't especially useful if you are using the default
    237 ``autocommit`` behaviour of Django. However, if you are using
     237``autocommit`` behavior of Django. However, if you are using
    238238``commit_on_success`` or ``commit_manually``, each open transaction will build
    239239up a series of database operations, awaiting a commit or rollback. If you
    240240issue a rollback, the entire transaction is rolled back. Savepoints provide
  • docs/topics/class-based-views.txt

     
    7272
    7373Then, we just need to add this new view into our URLconf. As the class-based
    7474views themselves are classes, we point the URL to the as_view class method
    75 instead, which is the entrypoint for class-based views::
     75instead, which is the entry point for class-based views::
    7676
    7777    # urls.py
    7878    from django.conf.urls.defaults import *
  • docs/topics/testing.txt

     
    9595
    9696        import unittest
    9797
    98     If you want to continue to use the base unittest libary, you can --
     98    If you want to continue to use the base unittest library, you can --
    9999    you just won't get any of the nice new unittest2 features.
    100100
    101101.. _unittest2: http://pypi.python.org/pypi/unittest2
  • docs/topics/logging.txt

     
    156156some other way of organizing your logging messages, you can provide
    157157any dot-separated name to identify your logger::
    158158
    159     # Get an instance of a specfic named logger
     159    # Get an instance of a specific named logger
    160160    logger = logging.getLogger('project.interesting.stuff')
    161161
    162162The dotted paths of logger names define a hierarchy. The
  • docs/topics/signals.txt

     
    106106Connecting receiver functions
    107107-----------------------------
    108108
    109 There are two ways you can connect a receiever to a signal. You can take the
     109There are two ways you can connect a receiver to a signal. You can take the
    110110manual connect route:
    111111
    112112.. code-block:: python
  • docs/releases/1.3.txt

     
    521521Previously, a callable in a template would only be called automatically as part
    522522of the variable resolution process if it was retrieved via attribute
    523523lookup. This was an inconsistency that could result in confusing and unhelpful
    524 behaviour::
     524behavior::
    525525
    526526    >>> Template("{{ user.get_full_name }}").render(Context({'user': user}))
    527527    u'Joe Bloggs'
     
    529529    u'&lt;bound method User.get_full_name of &lt;...
    530530
    531531This has been resolved in Django 1.3 - the result in both cases will be ``u'Joe
    532 Bloggs'``. Although the previous behaviour was not useful for a template language
     532Bloggs'``. Although the previous behavior was not useful for a template language
    533533designed for web designers, and was never deliberately supported, it is possible
    534534that some templates may be broken by this change.
    535535
  • docs/releases/1.4.txt

     
    132132version would redirect to ``/notaflatpageoravalidurl/``, which would
    133133subsequently raise a 404. Requesting ``/notaflatpageoravalidurl`` now will
    134134immediately raise a 404. Additionally redirects returned by flatpages are now
    135 permanent (301 status code) to match the behaviour of the
     135permanent (301 status code) to match the behavior of the
    136136:class:`~django.middleware.common.CommonMiddleware`.
    137137
    138138`COMMENTS_BANNED_USERS_GROUP` setting
     
    144144app, e.g. the template tags. To fix this problem the code was removed from
    145145the feed class.
    146146
    147 If you rely on the feature and want to restore the old behaviour, simply use
     147If you rely on the feature and want to restore the old behavior, simply use
    148148a custom comment model manager to exclude the user group, e.g.::
    149149
    150150    from django.conf import settings
  • docs/releases/1.3-beta-1.txt

     
    2727automatically serve static files during development (if the :setting:`DEBUG`
    2828setting is ``True``) when using the :djadmin:`runserver` management command.
    2929Based on feedback from the community this release adds two new options to the
    30 :djadmin:`runserver` command to modify this behaviour:
     30:djadmin:`runserver` command to modify this behavior:
    3131
    3232    * ``--nostatic``: prevents the :djadmin:`runserver` command from serving
    3333      files completely.
  • docs/ref/models/querysets.txt

     
    986986
    987987Usually, if another transaction has already acquired a lock on one of the
    988988selected rows, the query will block until the lock is released. If this is
    989 not the behaviour you want, call ``select_for_update(nowait=True)``. This will
     989not the behavior you want, call ``select_for_update(nowait=True)``. This will
    990990make the call non-blocking. If a conflicting lock is already acquired by
    991991another transaction, ``django.db.utils.DatabaseError`` will be raised when
    992992the queryset is evaluated.
     
    11241124    Foo.objects.get_or_create(defaults__exact='bar', defaults={'defaults': 'baz'})
    11251125
    11261126
    1127 The ``get_or_create()`` method has similar error behaviour to ``create()``
     1127The ``get_or_create()`` method has similar error behavior to ``create()``
    11281128when you are using manually specified primary keys. If an object needs to be
    11291129created and the key already exists in the database, an ``IntegrityError`` will
    11301130be raised.
  • docs/ref/forms/validation.txt

     
    361361``cleaned_data``.
    362362
    363363In fact, Django will currently completely wipe out the ``cleaned_data``
    364 dictionary if there are any errors in the form. However, this behaviour may
     364dictionary if there are any errors in the form. However, this behavior may
    365365change in the future, so it's not a bad idea to clean up after yourself in the
    366366first place.
  • docs/ref/contrib/flatpages.txt

     
    8686
    8787    .. versionchanged:: 1.4
    8888       Redirects by the middlware are permanent (301 status code) instead of
    89        temporary (302) to match behaviour of the
     89       temporary (302) to match behavior of the
    9090       :class:`~django.middleware.common.CommonMiddleware`.
    9191
    9292    If it doesn't find a match, the request continues to be processed as usual.
  • docs/ref/contrib/csrf.txt

     
    396396Settings
    397397========
    398398
    399 A number of settings can be used to control Django's CSRF behaviour.
     399A number of settings can be used to control Django's CSRF behavior.
    400400
    401401CSRF_COOKIE_DOMAIN
    402402------------------
Back to Top