Ticket #8991: django.git-docs-trunk.patch

File django.git-docs-trunk.patch, 60.2 KB (added by Marc Fargas, 16 years ago)

Fix.

  • docs/howto/custom-management-commands.txt

    From: Marc Fargas <telenieko@telenieko.com>
    Date: Tue, 9 Sep 2008 15:16:29 +0000 (+0200)
    Subject: And the last ones.
    X-Git-Url: http://www.marcfargas.com/gitweb/?p=django.git;a=commitdiff_plain;h=docs-trunk;hp=master
    
    And the last ones.
    ---
    
    diff --git a/docs/howto/custom-management-commands.txt b/docs/howto/custom-management-commands.txt
    index b6cc850..277622b 100644
    a b  
    33Writing custom django-admin commands
    44====================================
    55
    6 .. versionadded:: 1.0
    7 
    86Applications can register their own actions with ``manage.py``. For example,
    97you might want to add a ``manage.py`` action for a Django app that you're
    108distributing.
    The ``explode.py`` module has only one requirement -- it must define a class  
    3028called ``Command`` that extends ``django.core.management.base.BaseCommand``.
    3129
    3230For more details on how to define your own commands, look at the code for the
    33 existing ``django-admin.py`` commands, in ``/django/core/management/commands``.
    34  No newline at end of file
     31existing ``django-admin.py`` commands, in ``/django/core/management/commands``.
  • docs/howto/custom-model-fields.txt

    diff --git a/docs/howto/custom-model-fields.txt b/docs/howto/custom-model-fields.txt
    index 9364384..63c428e 100644
    a b  
    44Writing custom model fields
    55===========================
    66
    7 .. versionadded:: 1.0
    8 
    97Introduction
    108============
    119
  • docs/howto/custom-template-tags.txt

    diff --git a/docs/howto/custom-template-tags.txt b/docs/howto/custom-template-tags.txt
    index e1ddefe..ab699ac 100644
    a b will use the function's name as the filter name.  
    157157Filters and auto-escaping
    158158~~~~~~~~~~~~~~~~~~~~~~~~~
    159159
    160 .. versionadded:: 1.0
    161 
    162160When writing a custom filter, give some thought to how the filter will interact
    163161with Django's auto-escaping behavior. Note that three types of strings can be
    164162passed around inside the template code:
    without having to be parsed multiple times.  
    422420Auto-escaping considerations
    423421~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    424422
    425 .. versionadded:: 1.0
    426 
    427423The output from template tags is **not** automatically run through the
    428424auto-escaping filters. However, there are still a couple of things you should
    429425keep in mind when writing a template tag.
    Now your tag should begin to look like this::  
    525521
    526522You also have to change the renderer to retrieve the actual contents of the
    527523``date_updated`` property of the ``blog_entry`` object.  This can be
    528 accomplished by using the ``resolve_variable()`` function in
    529 ``django.template``. You pass ``resolve_variable()`` the variable name and the
    530 current context, available in the ``render`` method::
     524accomplished by using the ``Variable()`` class in ``django.template``.
     525
     526To use the ``Variable`` class, simply instantiate it with the name of the
     527variable to be resolved, and then call ``variable.resolve(context)``. So,
     528for example::
    531529
    532     from django import template
    533     from django.template import resolve_variable
    534     import datetime
    535530    class FormatTimeNode(template.Node):
    536531        def __init__(self, date_to_be_formatted, format_string):
    537             self.date_to_be_formatted = date_to_be_formatted
     532            self.date_to_be_formatted = Variable(date_to_be_formatted)
    538533            self.format_string = format_string
    539534
    540535        def render(self, context):
    541536            try:
    542                 actual_date = resolve_variable(self.date_to_be_formatted, context)
     537                actual_date = self.date_to_be_formatted.resolve(context)
    543538                return actual_date.strftime(self.format_string)
    544539            except template.VariableDoesNotExist:
    545540                return ''
    546541
    547 ``resolve_variable`` will try to resolve ``blog_entry.date_updated`` and then
    548 format it accordingly.
    549 
    550 .. versionadded:: 1.0
    551 
    552     Variable resolution has changed in the development version of Django.
    553     ``template.resolve_variable()`` is still available, but has been deprecated
    554     in favor of a new ``template.Variable`` class. Using this class will usually
    555     be more efficient than calling ``template.resolve_variable``
    556 
    557     To use the ``Variable`` class, simply instantiate it with the name of the
    558     variable to be resolved, and then call ``variable.resolve(context)``. So,
    559     in the development version, the above example would be more correctly
    560     written as:
    561 
    562     .. parsed-literal::
    563 
    564         class FormatTimeNode(template.Node):
    565             def __init__(self, date_to_be_formatted, format_string):
    566                 self.date_to_be_formatted = **Variable(date_to_be_formatted)**
    567                 self.format_string = format_string
    568 
    569             def render(self, context):
    570                 try:
    571                     actual_date = **self.date_to_be_formatted.resolve(context)**
    572                     return actual_date.strftime(self.format_string)
    573                 except template.VariableDoesNotExist:
    574                     return ''
    575 
    576     Changes are highlighted in bold.
    577 
    578542Variable resolution will throw a ``VariableDoesNotExist`` exception if it cannot
    579543resolve the string passed to it in the current context of the page.
    580544
  • docs/howto/deployment/modpython.txt

    diff --git a/docs/howto/deployment/modpython.txt b/docs/howto/deployment/modpython.txt
    index 7612b40..cac6565 100644
    a b This tells Apache: "Use mod_python for any URL at or under '/mysite/', using the  
    4949Django mod_python handler." It passes the value of :ref:`DJANGO_SETTINGS_MODULE
    5050<django-settings-module>` so mod_python knows which settings to use.
    5151
    52 .. versionadded:: 1.0
    53     The ``PythonOption django.root ...`` is new in this version.
    54 
    5552Because mod_python does not know we are
    5653serving this site from underneath the ``/mysite/`` prefix, this value needs to
    5754be passed through to the mod_python handler in Django, via the ``PythonOption
  • docs/internals/contributing.txt

    diff --git a/docs/internals/contributing.txt b/docs/internals/contributing.txt
    index 52b52d6..eda463a 100644
    a b General improvements, or other changes to the APIs that should be emphasised  
    605605should use the ".. versionchanged:: X.Y" directive (with the same format as the
    606606``versionadded`` mentioned above.
    607607
     608In case you doubt about which version to write on the note just leave it as "X.Y",
     609or the version currently being developed. The person commiting your change will
     610make sure it has the proper version number.
     611
    608612Guidelines for ReST files
    609613-------------------------
    610614
  • docs/ref/contrib/flatpages.txt

    diff --git a/docs/ref/contrib/flatpages.txt b/docs/ref/contrib/flatpages.txt
    index f1c3a1b..46a81a0 100644
    a b Django comes with an optional "flatpages" application. It lets you store simple  
    1111"flat" HTML content in a database and handles the management for you via
    1212Django's admin interface and a Python API.
    1313
    14 A flatpage is a simple object with a URL, title and content. Use it for
     14A flatpage is a simple object with a URL, title an optional content. Use it for
    1515one-off, special-case pages, such as "About" or "Privacy Policy" pages, that
    1616you want to store in a database but for which you don't want to develop a
    1717custom Django application.
    custom Django application.  
    1919A flatpage can use a custom template or a default, systemwide flatpage
    2020template. It can be associated with one, or multiple, sites.
    2121
    22 .. versionadded:: 1.0
    23 
    24 The content field may optionally be left blank if you prefer to put your
    25 content in a custom template.
    26 
    2722Here are some examples of flatpages on Django-powered sites:
    2823
    2924    * http://www.chicagocrime.org/about/
  • docs/ref/contrib/formtools/form-wizard.txt

    diff --git a/docs/ref/contrib/formtools/form-wizard.txt b/docs/ref/contrib/formtools/form-wizard.txt
    index cf57e79..9400d87 100644
    a b Form wizard  
    77.. module:: django.contrib.formtools.wizard
    88    :synopsis: Splits forms across multiple Web pages.
    99
    10 .. versionadded:: 1.0
    11 
    1210Django comes with an optional "form wizard" application that splits
    1311:ref:`forms <topics-forms-index>` across multiple Web pages. It maintains
    1412state in hashed HTML :samp:`<input type="hidden">` fields, and the data isn't
  • docs/ref/contrib/humanize.txt

    diff --git a/docs/ref/contrib/humanize.txt b/docs/ref/contrib/humanize.txt
    index 07a62a7..41297b6 100644
    a b You can pass in either an integer or a string representation of an integer.  
    7474naturalday
    7575----------
    7676
    77 .. versionadded:: 1.0
    78 
    7977For dates that are the current day or within one day, return "today",
    8078"tomorrow" or "yesterday", as appropriate. Otherwise, format the date using
    8179the passed in format string.
  • docs/ref/contrib/index.txt

    diff --git a/docs/ref/contrib/index.txt b/docs/ref/contrib/index.txt
    index 82a8955..3d58191 100644
    a b See :ref:`topics-auth`.  
    5959comments
    6060========
    6161
    62 .. versionchanged:: 1.0
    63    The comments application has been rewriten. See :ref:`ref-contrib-comments-upgrade`
    64    for information on howto upgrade.
    65 
    6662A simple yet flexible comments system. See :ref:`ref-contrib-comments-index`.
    6763
    6864contenttypes
  • docs/ref/contrib/sitemaps.txt

    diff --git a/docs/ref/contrib/sitemaps.txt b/docs/ref/contrib/sitemaps.txt
    index bdfb77c..b4e2797 100644
    a b each time you call ``save()``.  
    342342Pinging Google via `manage.py`
    343343------------------------------
    344344
    345 .. versionadded:: 1.0
    346 
    347345Once the sitemaps application is added to your project, you may also
    348346ping the Google server's through the command line manage.py interface::
    349347
  • docs/ref/contrib/sites.txt

    diff --git a/docs/ref/contrib/sites.txt b/docs/ref/contrib/sites.txt
    index 28c8f4d..20823d5 100644
    a b To do this, you can use the sites framework. A simple example::  
    230230Caching the current ``Site`` object
    231231===================================
    232232
    233 .. versionadded:: 1.0
    234 
    235233As the current site is stored in the database, each call to
    236234``Site.objects.get_current()`` could result in a database query. But Django is a
    237235little cleverer than that: on the first request, the current site is cached, and
    Here's how Django uses the sites framework:  
    379377
    380378.. _requestsite-objects:
    381379
    382 .. versionadded:: 1.0
    383 
    384380Some :ref:`django.contrib <ref-contrib-index>` applications take advantage of
    385381the sites framework but are architected in a way that doesn't *require* the
    386382sites framework to be installed in your database. (Some people don't want to, or
  • docs/ref/contrib/syndication.txt

    diff --git a/docs/ref/contrib/syndication.txt b/docs/ref/contrib/syndication.txt
    index a2ee621..4cb9fb1 100644
    a b request to the URL :file:`/rss/beats/0613/`:  
    265265      :exc:`ObjectDoesNotExist` in :meth:`get_object()` tells Django to produce
    266266      a 404 error for that request.
    267267
    268       .. versionadded:: 1.0
    269          meth:`get_object()` can handle the :file:`/rss/beats/` url.
    270 
    271268      The :meth:`get_object()` method also has a chance to handle the
    272269      :file:`/rss/beats/` url. In this case, :data:`bits` will be an
    273270      empty list. In our example, ``len(bits) != 1`` and an
  • docs/ref/databases.txt

    diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt
    index 28651a5..0b4fe83 100644
    a b many-to-many table would be stored in the ``indexes`` tablespace. The ``data``  
    360360field would also generate an index, but no tablespace for it is specified, so
    361361it would be stored in the model tablespace ``tables`` by default.
    362362
    363 .. versionadded:: 1.0
    364 
    365363Use the :setting:`DEFAULT_TABLESPACE` and :setting:`DEFAULT_INDEX_TABLESPACE`
    366364settings to specify default values for the db_tablespace options.
    367365These are useful for setting a tablespace for the built-in Django apps and
  • docs/ref/django-admin.txt

    diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
    index 9f25b10..98f44c5 100644
    a b Available subcommands  
    9898cleanup
    9999-------
    100100
    101 .. versionadded:: 1.0
    102 
    103101Can be run as a cronjob or directly to clean out old data from the database
    104102(only expired sessions at the moment).
    105103
    106104compilemessages
    107105---------------
    108106
    109 .. versionchanged:: 1.0
    110    Before 1.0 this was the "bin/compile-messages.py" command.
    111 
    112107Compiles .po files created with ``makemessages`` to .mo files for use with
    113108the builtin gettext support. See :ref:`topics-i18n`.
    114109
    createsuperuser  
    135130
    136131.. django-admin:: createsuperuser
    137132
    138 .. versionadded:: 1.0
    139 
    140133Creates a superuser account (a user who has all permissions). This is
    141134useful if you need to create an initial superuser account but did not
    142135do so during ``syncdb``, or if you need to programmatically generate
    objects will be dumped.  
    210203
    211204.. django-admin-option:: --exclude
    212205
    213 .. versionadded:: 1.0
    214 
    215206Exclude a specific application from the applications whose contents is
    216207output. For example, to specifically exclude the `auth` application from
    217208the output, you would call::
    Example usage::  
    384375makemessages
    385376------------
    386377
    387 .. versionchanged:: 1.0
    388    Before 1.0 this was the ``bin/make-messages.py`` command.
    389 
    390378Runs over the entire source tree of the current directory and pulls out all
    391379strings marked for translation. It creates (or updates) a message file in the
    392380conf/locale (in the django tree) or locale (for project and application)
    Example usage::  
    736724testserver <fixture fixture ...>
    737725--------------------------------
    738726
    739 .. versionadded:: 1.0
    740 
    741727Runs a Django development server (as in ``runserver``) using data from the
    742728given fixture(s).
    743729
  • docs/ref/forms/api.txt

    diff --git a/docs/ref/forms/api.txt b/docs/ref/forms/api.txt
    index 72dfcb6..92e911a 100644
    a b object::  
    157157    >>> f.cleaned_data
    158158    {'cc_myself': True, 'message': u'Hi there', 'sender': u'foo@example.com', 'subject': u'hello'}
    159159
    160 .. versionchanged:: 1.0
    161     The ``cleaned_data`` attribute was called ``clean_data`` in earlier releases.
    162 
    163160Note that any text-based field -- such as ``CharField`` or ``EmailField`` --
    164161always cleans the input into a Unicode string. We'll cover the encoding
    165162implications later in this document.
    when printed::  
    563560Binding uploaded files to a form
    564561--------------------------------
    565562
    566 .. versionadded:: 1.0
    567 
    568563Dealing with forms that have ``FileField`` and ``ImageField`` fields
    569564is a little more complicated than a normal form.
    570565
  • docs/ref/forms/fields.txt

    diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt
    index 0656c32..5d6b3fd 100644
    a b fields. We've specified ``auto_id=False`` to simplify the output::  
    219219``error_messages``
    220220~~~~~~~~~~~~~~~~~~
    221221
    222 .. versionadded:: 1.0
    223 
    224222.. attribute:: Field.error_messages
    225223
    226224
    For each field, we describe the default widget used if you don't specify  
    315313      the field has ``required=True``.
    316314    * Error message keys: ``required``
    317315
    318 .. versionchanged:: 1.0
    319    The empty value for a ``CheckboxInput`` (and hence the standard ``BooleanField``)
    320    has changed to return ``False`` instead of ``None`` in the development version.
    321 
    322316.. note::
    323317
    324318    Since all ``Field`` subclasses have ``required=True`` by default, the
    If no ``input_formats`` argument is provided, the default input formats are::  
    449443    '%m/%d/%y %H:%M',        # '10/25/06 14:30'
    450444    '%m/%d/%y',              # '10/25/06'
    451445
    452 .. versionchanged:: 1.0
    453    The ``DateTimeField`` used to use a ``TextInput`` widget by default. This has now changed.
    454 
    455446``DecimalField``
    456447~~~~~~~~~~~~~~~~
    457448
    458 .. versionadded:: 1.0
    459 
    460449.. class:: DecimalField(**kwargs)
    461450
    462451    * Default widget: ``TextInput``
    given length.  
    504493``FileField``
    505494~~~~~~~~~~~~~
    506495
    507 .. versionadded:: 1.0
    508 
    509496.. class:: FileField(**kwargs)
    510497
    511498    * Default widget: ``FileInput``
    When you use a ``FileField`` in a form, you must also remember to  
    524511``FilePathField``
    525512~~~~~~~~~~~~~~~~~
    526513
    527 .. versionadded:: 1.0
    528 
    529514.. class:: FilePathField(**kwargs)
    530515
    531516    * Default widget: ``Select``
    These control the range of values permitted in the field.  
    570555``ImageField``
    571556~~~~~~~~~~~~~~
    572557
    573 .. versionadded:: 1.0
    574 
    575558.. class:: ImageField(**kwargs)
    576559
    577560    * Default widget: ``FileInput``
  • docs/ref/forms/widgets.txt

    diff --git a/docs/ref/forms/widgets.txt b/docs/ref/forms/widgets.txt
    index c9cc292..e9a55c9 100644
    a b commonly used groups of widgets:  
    3838
    3939.. class:: DateTimeInput
    4040
    41     .. versionadded:: 1.0
    42 
    4341    Date/time input as a simple text box: ``<input type='text' ...>``
    4442
    4543.. class:: Textarea
  • docs/ref/generic-views.txt

    diff --git a/docs/ref/generic-views.txt b/docs/ref/generic-views.txt
    index f92674e..b78feb4 100644
    a b a date in the *future* are not included unless you set ``allow_future`` to  
    198198      specified in ``date_field`` is greater than the current date/time. By
    199199      default, this is ``False``.
    200200
    201     .. versionadded:: 1.0
    202 
    203201    * ``template_object_name``: Designates the name of the template variable
    204202      to use in the template context. By default, this is ``'latest'``.
    205203
    In addition to ``extra_context``, the template's context will be:  
    224222      ordered in reverse. This is equivalent to
    225223      ``queryset.dates(date_field, 'year')[::-1]``.
    226224
    227     .. versionchanged:: 1.0
    228        The behaviour depending on ``template_object_name`` is new in this version.
    229 
    230225    * ``latest``: The ``num_latest`` objects in the system, ordered descending
    231226      by ``date_field``. For example, if ``num_latest`` is ``10``, then
    232227      ``latest`` will be a list of the latest 10 objects in ``queryset``.
    If ``template_name`` isn't specified, this view will use the template  
    736731
    737732**Template context:**
    738733
    739 .. versionadded:: 1.0
    740    The ``paginator`` and ``page_obj`` context variables are new.
    741 
    742734In addition to ``extra_context``, the template's context will be:
    743735
    744736    * ``object_list``: The list of objects. This variable's name depends on the
    represented as page ``1``.  
    782774For more on pagination, read the :ref:`pagination documentation
    783775<topics-pagination>`.
    784776
    785 .. versionadded:: 1.0
    786 
    787777As a special case, you are also permitted to use ``last`` as a value for
    788778``page``::
    789779
    Create/update/delete generic views  
    868858The ``django.views.generic.create_update`` module contains a set of functions
    869859for creating, editing and deleting objects.
    870860
    871 .. versionchanged:: 1.0
    872 
    873 ``django.views.generic.create_update.create_object`` and
    874 ``django.views.generic.create_update.update_object`` now use the new :ref:`forms
    875 library <topics-forms-index>` to build and display the form.
    876 
    877861``django.views.generic.create_update.create_object``
    878862----------------------------------------------------
    879863
  • docs/ref/middleware.txt

    diff --git a/docs/ref/middleware.txt b/docs/ref/middleware.txt
    index e47accc..40ee983 100644
    a b Adds a few conveniences for perfectionists:  
    5454      don't have a valid URL pattern for ``foo.com/bar`` but *do* have a valid
    5555      pattern for ``foo.com/bar/``.
    5656
    57       .. versionchanged:: 1.0
    58          The behavior of :setting:`APPEND_SLASH` has changed slightly in this
    59          version. It didn't used to check whether the pattern was matched in
    60          the URLconf.
    61 
    6257      If :setting:`PREPEND_WWW` is ``True``, URLs that lack a leading "www."
    6358      will be redirected to the same URL with a leading "www."
    6459
    CSRF protection middleware  
    175170
    176171.. class:: django.contrib.csrf.middleware.CsrfMiddleware
    177172
    178 .. versionadded:: 1.0
    179 
    180173Adds protection against Cross Site Request Forgeries by adding hidden form
    181174fields to POST forms and checking requests for the correct value. See the
    182175:ref:`Cross Site Request Forgery protection documentation <ref-contrib-csrf>`.
  • docs/ref/models/fields.txt

    diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
    index 9c5fd23..a32de04 100644
    a b If ``True``, djadmin:`django-admin.py sqlindexes <sqlindexes>` will output a  
    171171
    172172.. attribute:: Field.db_tablespace
    173173
    174 .. versionadded:: 1.0
    175 
    176174The name of the database tablespace to use for this field's index, if this field
    177175is indexed. The default is the project's :setting:`DEFAULT_INDEX_TABLESPACE`
    178176setting, if set, or the :attr:`~Field.db_tablespace` of the model, if any. If
    shortcuts.  
    379377``DecimalField``
    380378----------------
    381379
    382 .. versionadded:: 1.0
    383 
    384380.. class:: DecimalField(max_digits=None, decimal_places=None, [**options])
    385381
    386382A fixed-precision decimal number, represented in Python by a
    A file-upload field. Has one **required** argument:  
    435431    date/time of the file upload (so that uploaded files don't fill up the given
    436432    directory).
    437433   
    438     .. versionchanged:: 1.0
    439 
    440434    This may also be a callable, such as a function, which will be called to
    441435    obtain the upload path, including the filename. This callable must be able
    442436    to accept two arguments, and return a Unix-style path (with forward slashes)
    Also has one optional argument:  
    465459
    466460.. attribute:: FileField.storage
    467461
    468     .. versionadded:: 1.0
    469    
    470462    Optional. A storage object, which handles the storage and retrieval of your
    471463    files. See :ref:`topics-files` for details on how to provide this object.
    472464
    without validation, to a directory that's within your Web server's document  
    513505root, then somebody could upload a CGI or PHP script and execute that script by
    514506visiting its URL on your site. Don't allow that.
    515507
    516 .. versionadded:: 1.0
    517    The ``max_length`` argument was added in this version.
    518 
    519508By default, :class:`FileField` instances are
    520509created as ``varchar(100)`` columns in your database. As with other fields, you
    521510can change the maximum length using the :attr:`~CharField.max_length` argument.
    base filename, not the full path. So, this example::  
    559548because the :attr:`~FilePathField.match` applies to the base filename
    560549(``foo.gif`` and ``bar.gif``).
    561550
    562 .. versionadded:: 1.0
    563    The ``max_length`` argument was added in this version.
    564 
    565551By default, :class:`FilePathField` instances are
    566552created as ``varchar(100)`` columns in your database. As with other fields, you
    567553can change the maximum length using the :attr:`~CharField.max_length` argument.
    can change the maximum length using the :attr:`~CharField.max_length` argument.  
    571557
    572558.. class:: FloatField([**options])
    573559
    574 .. versionchanged:: 1.0
    575 
    576560A floating-point number represented in Python by a ``float`` instance.
    577561
    578562The admin represents this as an ``<input type="text">`` (a single-line input).
    Requires the `Python Imaging Library`_.  
    608592
    609593.. _Python Imaging Library: http://www.pythonware.com/products/pil/
    610594
    611 .. versionadded:: 1.0
    612    The ``max_length`` argument was added in this version.
    613 
    614595By default, :class:`ImageField` instances are
    615596created as ``varchar(100)`` columns in your database. As with other fields, you
    616597can change the maximum length using the :attr:`~CharField.max_length` argument.
    Note, however, that this only refers to models in the same ``models.py`` file --  
    776757you cannot use a string to reference a model defined in another application or
    777758imported from elsewhere.
    778759
    779 .. versionchanged:: 1.0
    780    Refering models in other applications must include the application label.
    781 
    782760To refer to models defined in another
    783761application, you must instead explicitly specify the application label. For
    784762example, if the ``Manufacturer`` model above is defined in another application
  • docs/ref/models/instances.txt

    diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt
    index c7ea4f3..9c6e0f2 100644
    a b To save an object back to the database, call ``save()``:  
    3535
    3636Of course, there are some subtleties; see the sections below.
    3737
    38 .. versionadded:: 1.0
    39 
    40 The signature of the ``save()`` method has changed from earlier versions
    41 (``force_insert`` and ``force_update`` have been added). If you are overriding
    42 these methods, be sure to use the correct signature.
    43 
    4438Auto-incrementing primary keys
    4539------------------------------
    4640
    documentation for ``AutoField`` for more details.  
    6357The ``pk`` property
    6458~~~~~~~~~~~~~~~~~~~
    6559
    66 .. versionadded:: 1.0
    67 
    6860.. attribute:: Model.pk
    6961
    7062Regardless of whether you define a primary key field yourself, or let Django
    auto-primary-key values`_ above and `Forcing an INSERT or UPDATE`_ below.  
    173165Forcing an INSERT or UPDATE
    174166~~~~~~~~~~~~~~~~~~~~~~~~~~~
    175167
    176 .. versionadded:: 1.0
    177 
    178168In some rare circumstances, it's necessary to be able to force the ``save()``
    179169method to perform an SQL ``INSERT`` and not fall back to doing an ``UPDATE``.
    180170Or vice-versa: update, if possible, but not insert a new row. In these cases
  • docs/ref/models/options.txt

    diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt
    index e4e2d38..8e5f39b 100644
    a b Django quotes column and table names behind the scenes.  
    5555
    5656.. attribute:: Options.db_tablespace
    5757
    58 .. versionadded:: 1.0
    59 
    6058The name of the database tablespace to use for the model. If the backend doesn't
    6159support tablespaces, this option is ignored.
    6260
    It's used in the Django admin and is enforced at the database level (i.e., the  
    152150appropriate ``UNIQUE`` statements are included in the ``CREATE TABLE``
    153151statement).
    154152
    155 .. versionadded:: 1.0
    156 
    157153For convenience, unique_together can be a single list when dealing with a single
    158154set of fields::
    159155
  • docs/ref/models/querysets.txt

    diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
    index 68b69b6..010b683 100644
    a b ordering piece of data for each of the main items you are selecting, the  
    176176ordering may well be exactly what you want to do. Use ordering on multi-valued
    177177fields with care and make sure the results are what you expect.
    178178
    179 .. versionadded:: 1.0
    180 
    181179If you don't want any ordering to be applied to a query, not even the default
    182180ordering, call ``order_by()`` with no parameters.
    183181
    184 .. versionadded:: 1.0
    185 
    186182The syntax for ordering across related models has changed. See the `Django 0.96
    187183documentation`_ for the old behaviour.
    188184
    A couple of subtleties that are worth mentioning:  
    290286
    291287        >>> Entry.objects.values('blog_id')
    292288        [{'blog_id': 1}, ...]
     289
    293290    * When using ``values()`` together with ``distinct()``, be aware that
    294291      ordering can affect the results. See the note in the `distinct()`_
    295292      section, above, for details.
    296293
    297 .. versionadded:: 1.0
    298 
    299 Previously, it was not possible to pass ``blog_id`` to ``values()`` in the above
    300 example, only ``blog``.
    301 
    302294A ``ValuesQuerySet`` is useful when you know you're only going to need values
    303295from a small number of the available fields and you won't need the
    304296functionality of a model instance object. It's more efficient to select only
    individualism.  
    319311``values_list(*fields)``
    320312~~~~~~~~~~~~~~~~~~~~~~~~
    321313
    322 .. versionadded:: 1.0
    323 
    324314This is similar to ``values()`` except that instead of returning a list of
    325315dictionaries, it returns a list of tuples. Each tuple contains the value from
    326316the respective field passed into the ``values_list()`` call -- so the first
    Examples::  
    381371``none()``
    382372~~~~~~~~~~
    383373
    384 .. versionadded:: 1.0
    385 
    386374Returns an ``EmptyQuerySet`` -- a ``QuerySet`` that always evaluates to
    387375an empty list. This can be used in cases where you know that you should
    388376return an empty result set and your caller is expecting a ``QuerySet``
    follow::  
    463451    p = b.author         # Doesn't hit the database.
    464452    c = p.hometown       # Requires a database call.
    465453
    466 .. versionadded:: 1.0
    467 
    468 The ``depth`` argument is new in Django version 1.0.
    469 
    470454``extra(select=None, where=None, params=None, tables=None, order_by=None, select_params=None)``
    471455~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    472456
    of the arguments is required, but you should use at least one of them.  
    525509    some database backends, such as some MySQL versions, don't support
    526510    subqueries.
    527511
    528     .. versionadded:: 1.0
    529 
    530512    In some rare cases, you might wish to pass parameters to the SQL fragments
    531513    in ``extra(select=...)```. For this purpose, use the ``select_params``
    532514    parameter. Since ``select_params`` is a sequence and the ``select``
    SQL equivalents::  
    857839    SELECT ... WHERE id = 14;
    858840    SELECT ... WHERE id IS NULL;
    859841
    860 .. versionchanged:: 1.0
    861    The semantics of ``id__exact=None`` have
    862    changed in the development version. Previously, it was (intentionally)
    863    converted to ``WHERE id = NULL`` at the SQL level, which would never match
    864    anything. It has now been changed to behave the same as ``id__isnull=True``.
    865 
    866842.. admonition:: MySQL comparisons
    867843
    868844    In MySQL, whether or not ``exact`` comparisons are case-insensitive by
    database to add the full-text index.  
    11391115regex
    11401116~~~~~
    11411117
    1142 .. versionadded:: 1.0
    1143 
    11441118Case-sensitive regular expression match.
    11451119
    11461120The regular expression syntax is that of the database backend in use. In the
    regular expression syntax is recommended.  
    11671141iregex
    11681142~~~~~~
    11691143
    1170 .. versionadded:: 1.0
    1171 
    11721144Case-insensitive regular expression match.
    11731145
    11741146Example::
  • docs/ref/request-response.txt

    diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt
    index 89e5195..2805280 100644
    a b All attributes except ``session`` should be considered read-only.  
    4949
    5050.. attribute:: HttpRequest.encoding
    5151
    52     .. versionadded:: 1.0
    53 
    5452    A string representing the current encoding used to decode form submission
    5553    data (or ``None``, which means the ``DEFAULT_CHARSET`` setting is used).
    5654    You can write to this attribute to change the encoding used when accessing
    All attributes except ``session`` should be considered read-only.  
    112110    ``enctype="multipart/form-data"``. Otherwise, ``FILES`` will be a blank
    113111    dictionary-like object.
    114112
    115     .. versionchanged:: 1.0
    116 
    117113    In previous versions of Django, ``request.FILES`` contained simple ``dict``
    118114    objects representing uploaded files. This is no longer true -- files are
    119115    represented by ``UploadedFile`` objects as described below.
    Methods  
    182178
    183179.. method:: HttpRequest.get_host()
    184180
    185    .. versionadded:: 1.0
    186 
    187181   Returns the originating host of the request using information from the
    188182   ``HTTP_X_FORWARDED_HOST`` and ``HTTP_HOST`` headers (in that order). If
    189183   they don't provide a value, the method uses a combination of
    Methods  
    201195
    202196.. method:: HttpRequest.build_absolute_uri(location)
    203197
    204    .. versionadded:: 1.0
    205 
    206198   Returns the absolute URI form of ``location``. If no location is provided,
    207199   the location will be set to ``request.get_full_path()``.
    208200
    Methods  
    219211
    220212.. method:: HttpRequest.is_ajax()
    221213
    222    .. versionadded:: 1.0
    223 
    224214   Returns ``True`` if the request was made via an ``XMLHttpRequest``, by checking
    225215   the ``HTTP_X_REQUESTED_WITH`` header for the string ``'XMLHttpRequest'``. The
    226216   following major JavaScript libraries all send this header:
    In addition, ``QueryDict`` has the following methods:  
    348338
    349339.. method:: QueryDict.lists()
    350340
    351     Like :method:items(), except it includes all values, as a list, for each
     341    Like :meth:`items()`, except it includes all values, as a list, for each
    352342    member of the dictionary. For example::
    353343   
    354344         >>> q = QueryDict('a=1&a=2&a=3')
    Methods  
    447437
    448438    ``status`` is the `HTTP Status code`_ for the response.
    449439
    450     .. versionadded:: 1.0
    451 
    452440    ``content_type`` is an alias for ``mimetype``. Historically, this parameter
    453441    was only called ``mimetype``, but since this is actually the value included
    454442    in the HTTP ``Content-Type`` header, it can also include the character set
    types of HTTP responses. Like ``HttpResponse``, these subclasses live in  
    549537
    550538.. class:: HttpResponseBadRequest
    551539
    552     .. versionadded:: 1.0
    553 
    554540    Acts just like :class:`HttpResponse` but uses a 400 status code.
    555541
    556542.. class:: HttpResponseNotFound
  • docs/ref/settings.txt

    diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
    index 3dd83eb..d2deb95 100644
    a b Never deploy a site into production with ``DEBUG`` turned on.  
    289289DEBUG_PROPAGATE_EXCEPTIONS
    290290--------------------------
    291291
    292 .. versionadded:: 1.0
    293 
    294292Default: ``False``
    295293
    296294If set to True, Django's normal exception handling of view functions
    site manager(s).  
    344342DEFAULT_TABLESPACE
    345343------------------
    346344
    347 .. versionadded:: 1.0
    348 
    349345Default: ``''`` (Empty string)
    350346
    351347Default tablespace to use for models that don't specify one, if the
    backend supports it.  
    356352DEFAULT_INDEX_TABLESPACE
    357353------------------------
    358354
    359 .. versionadded:: 1.0
    360 
    361355Default: ``''`` (Empty string)
    362356
    363357Default tablespace to use for indexes on fields that don't specify
    trailing space.  
    437431EMAIL_USE_TLS
    438432-------------
    439433
    440 .. versionadded:: 1.0
    441 
    442434Default: ``False``
    443435
    444436Whether to use a TLS (secure) connection when talking to the SMTP server.
    Whether to use a TLS (secure) connection when talking to the SMTP server.  
    448440FILE_CHARSET
    449441------------
    450442
    451 .. versionadded:: 1.0
    452 
    453443Default: ``'utf-8'``
    454444
    455445The character encoding used to decode any files read from disk. This includes
    template files and initial SQL data files.  
    460450FILE_UPLOAD_HANDLERS
    461451--------------------
    462452
    463 .. versionadded:: 1.0
    464 
    465453Default::
    466454
    467455    ("django.core.files.uploadhandler.MemoryFileUploadHandler",
    A tuple of handlers to use for uploading. See :ref:`topics-files` for details.  
    474462FILE_UPLOAD_MAX_MEMORY_SIZE
    475463---------------------------
    476464
    477 .. versionadded:: 1.0
    478 
    479465Default: ``2621440`` (i.e. 2.5 MB).
    480466
    481467The maximum size (in bytes) that an upload will be before it gets streamed to
    the file system. See :ref:`topics-files` for details.  
    486472FILE_UPLOAD_TEMP_DIR
    487473--------------------
    488474
    489 .. versionadded:: 1.0
    490 
    491475Default: ``None``
    492476
    493477The directory to store data temporarily while uploading files. If ``None``,
    standard language format. For example, U.S. English is ``"en-us"``. See  
    617601LANGUAGE_COOKIE_NAME
    618602--------------------
    619603
    620 .. versionadded:: 1.0
    621 
    622604Default: ``'django_language'``
    623605
    624606The name of the cookie to use for the language cookie. This can be whatever you
    See :ref:`translations-in-your-own-projects`.  
    681663LOGIN_REDIRECT_URL
    682664------------------
    683665
    684 .. versionadded:: 1.0
    685 
    686666Default: ``'/accounts/profile/'``
    687667
    688668The URL where requests are redirected after login when the
    decorator, for example.  
    696676LOGIN_URL
    697677---------
    698678
    699 .. versionadded:: 1.0
    700 
    701679Default: ``'/accounts/login/'``
    702680
    703681The URL where requests are redirected for login, specially when using the
    The URL where requests are redirected for login, specially when using the  
    708686LOGOUT_URL
    709687----------
    710688
    711 .. versionadded:: 1.0
    712 
    713689Default: ``'/accounts/logout/'``
    714690
    715691LOGIN_URL counterpart.
    The e-mail address that error messages come from, such as those sent to  
    869845SESSION_ENGINE
    870846--------------
    871847
    872 .. versionadded:: 1.0
    873 
    874848Default: ``django.contrib.sessions.backends.db``
    875849
    876850Controls where Django stores session data. Valid values are:
    should be different from ``LANGUAGE_COOKIE_NAME``). See the :ref:`topics-http-se  
    916890SESSION_COOKIE_PATH
    917891-------------------
    918892
    919 .. versionadded:: 1.0
    920 
    921893Default: ``'/'``
    922894
    923895The path set on the session cookie. This should either match the URL path of your
    See the :ref:`topics-http-sessions`.  
    954926SESSION_FILE_PATH
    955927-----------------
    956928
    957 .. versionadded:: 1.0
    958 
    959929Default: ``None``
    960930
    961931If you're using file-based session storage, this sets the directory in
    misspelled) variables. See :ref:`invalid-template-variables`..  
    10611031TEST_DATABASE_CHARSET
    10621032---------------------
    10631033
    1064 .. versionadded:: 1.0
    1065 
    10661034Default: ``None``
    10671035
    10681036The character set encoding used to create the test database. The value of this
    Supported for the PostgreSQL_ (``postgresql``, ``postgresql_psycopg2``) and MySQ  
    10791047TEST_DATABASE_COLLATION
    10801048------------------------
    10811049
    1082 .. versionadded:: 1.0
    1083 
    10841050Default: ``None``
    10851051
    10861052The collation order to use when creating the test database. This value is
  • docs/ref/templates/api.txt

    diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt
    index a220c79..df9e932 100644
    a b See :ref:`topics-i18n` for more.  
    391391django.core.context_processors.media
    392392~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    393393
    394 .. versionadded:: 1.0
    395 
    396394If :setting:`TEMPLATE_CONTEXT_PROCESSORS` contains this processor, every
    397395``RequestContext`` will contain a variable ``MEDIA_URL``, providing the
    398396value of the :setting:`MEDIA_URL` setting.
  • docs/ref/templates/builtins.txt

    diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
    index a28cf4f..b3835fb 100644
    a b Built-in tag reference  
    2121autoescape
    2222~~~~~~~~~~
    2323
    24 .. versionadded:: 1.0
    25 
    2624Control the current auto-escaping behavior. This tag takes either ``on`` or
    2725``off`` as an argument and that determines whether auto-escaping is in effect
    2826inside the block.
    Ignore everything between ``{% comment %}`` and ``{% endcomment %}``  
    5654cycle
    5755~~~~~
    5856
    59 .. versionchanged:: 1.0
    60     Cycle among the given strings or variables each time this tag is encountered.
    61 
    6257Within a loop, cycles among the given strings/variables each time through the
    6358loop::
    6459
    provided in ``athlete_list``::  
    173168
    174169You can loop over a list in reverse by using ``{% for obj in list reversed %}``.
    175170
    176 .. versionadded:: 1.0
    177 
    178171If you need to loop over a list of lists, you can unpack the values
    179172in each sub-list into individual variables. For example, if your context
    180173contains a list of (x,y) coordinates called ``points``, you could use the
    such as this:  
    682675
    683676The template tag will output the string ``/clients/client/123/``.
    684677
    685 .. versionadded:: 1.0
    686 
    687678If you're using :ref:`named URL patterns <naming-url-patterns>`, you can
    688679refer to the name of the pattern in the ``url`` tag instead of using the
    689680path to the view.
    Note that if the URL you're reversing doesn't exist, you'll get an  
    692683:exc:`NoReverseMatch` exception raised, which will cause your site to display an
    693684error page.
    694685
    695 .. versionadded:: 1.0
    696 
    697686If you'd like to retrieve a URL without displaying it, you can use a slightly
    698687different call::
    699688
    which is rounded up to 88).  
    731720with
    732721~~~~
    733722
    734 .. versionadded:: 1.0
    735 
    736723Caches a complex variable under a simpler name. This is useful when accessing
    737724an "expensive" method (e.g., one that hits the database) multiple times.
    738725
    applied to the result will only result in one round of escaping being done. So  
    919906it is safe to use this function even in auto-escaping environments. If you want
    920907multiple escaping passes to be applied, use the ``force_escape`` filter.
    921908
    922 .. versionchanged:: 1.0
    923     Due to auto-escaping, the behavior of this filter has changed slightly.
    924     The replacements are only made once, after
    925     all other filters are applied -- including filters before and after it.
    926 
    927909.. templatefilter:: escapejs
    928910
    929911escapejs
    930912~~~~~~~~
    931913
    932 .. versionadded:: 1.0
    933 
    934914Escapes characters for use in JavaScript strings. This does *not* make the
    935915string safe for use in HTML, but does protect you from syntax errors when using
    936916templates to generate JavaScript/JSON.
    If ``value`` is the list ``['a', 'b', 'c']``, the output will be ``'a'``.  
    967947fix_ampersands
    968948~~~~~~~~~~~~~~
    969949
    970 .. versionchanged:: 1.0
    971     This is rarely useful as ampersands are now automatically escaped. See escape_ for more information.
    972 
    973950Replaces ampersands with ``&amp;`` entities.
    974951
    975952For example::
    with an argument of ``-1``.  
    10251002force_escape
    10261003~~~~~~~~~~~~
    10271004
    1028 .. versionadded:: 1.0
    1029 
    10301005Applies HTML escaping to a string (see the ``escape`` filter for details).
    10311006This filter is applied *immediately* and returns a new, escaped string. This
    10321007is useful in the rare cases where you need multiple escaping or want to apply
    If ``value`` is the list ``['a', 'b', 'c']``, the output will be the string  
    10801055last
    10811056~~~~
    10821057
    1083 .. versionadded:: 1.0
    1084 
    10851058Returns the last item in a list.
    10861059
    10871060For example::
    unordered_list  
    14341407Recursively takes a self-nested list and returns an HTML unordered list --
    14351408WITHOUT opening and closing <ul> tags.
    14361409
    1437 .. versionchanged:: 1.0
    1438    The format accepted by ``unordered_list`` has changed to be easier to understand.
    1439 
    14401410The list is assumed to be in the proper format. For example, if ``var`` contains
    14411411``['States', ['Kansas', ['Lawrence', 'Topeka'], 'Illinois']]``, then
    14421412``{{ var|unordered_list }}`` would return::
  • docs/ref/unicode.txt

    diff --git a/docs/ref/unicode.txt b/docs/ref/unicode.txt
    index 4976a35..16d2cc8 100644
    a b  
    44Unicode data in Django
    55======================
    66
    7 .. versionadded:: 1.0
    8 
    97Django natively supports Unicode data everywhere. Providing your database can
    108somehow store the data, you can safely pass around Unicode strings to
    119templates, models and the database.
  • docs/topics/auth.txt

    diff --git a/docs/topics/auth.txt b/docs/topics/auth.txt
    index b6e9a9d..9d454ec 100644
    a b Methods  
    167167
    168168    .. method:: models.User.set_unusable_password()
    169169
    170         .. versionadded:: 1.0
    171 
    172170        Marks the user as having no password set.  This isn't the same as having
    173171        a blank string for a password.
    174172        :meth:`~django.contrib.auth.models.User.check_password()` for this user
    Methods  
    180178
    181179    .. method:: models.User.has_usable_password()
    182180
    183         .. versionadded:: 1.0
    184 
    185181        Returns ``False`` if
    186182        :meth:`~django.contrib.auth.models.User.set_unusable_password()` has
    187183        been called for this user.
    they're used by Web requests, as explained in the next section.  
    365361Creating superusers
    366362-------------------
    367363
    368 .. versionadded:: 1.0
    369    The ``manage.py createsuperuser`` command is new.
    370 
    371364:djadmin:`manage.py syncdb <syncdb>` prompts you to create a superuser the first time
    372365you run it after adding ``'django.contrib.auth'`` to your
    373366:setting:`INSTALLED_APPS`. If you need to create a superuser at a later date,
    How to log a user out  
    560553    Note that :func:`~django.contrib.auth.logout()` doesn't throw any errors
    561554    if the user wasn't logged in.
    562555
    563     .. versionchanged:: 1.0
    564        Calling ``logout()`` now cleans session data.
    565 
    566556    When you call :func:`~django.contrib.auth.logout()`, the session
    567557    data for the current request is completely cleaned out. All existing data
    568558    is removed. This is to prevent another person from using the same web
  • docs/topics/cache.txt

    diff --git a/docs/topics/cache.txt b/docs/topics/cache.txt
    index 4f32627..d77e36c 100644
    a b production environment still will. To activate dummy caching, set  
    183183Using a custom cache backend
    184184----------------------------
    185185
    186 .. versionadded:: 1.0
    187 
    188186While Django includes support for a number of cache backends out-of-the-box,
    189187sometimes you might want to use a customized cache backend. To use an external
    190188cache backend with Django, use a Python import path as the scheme portion (the
    arguments.  
    237235The per-site cache
    238236==================
    239237
    240 .. versionchanged:: 1.0
    241     (previous versions of Django only provided a single ``CacheMiddleware`` instead
    242     of the two pieces described below).
    243 
    244238Once the cache is set up, the simplest way to use caching is to cache your
    245239entire site. You'll need to add
    246240``'django.middleware.cache.UpdateCacheMiddleware'`` and
    Additionally, the cache middleware automatically sets a few headers in each  
    288282
    289283See :ref:`topics-http-middleware` for more on middleware.
    290284
    291 .. versionadded:: 1.0
    292 
    293285If a view sets its own cache expiry time (i.e. it has a ``max-age`` section in
    294286its ``Cache-Control`` header) then the page will be cached until the expiry
    295287time, rather than ``CACHE_MIDDLEWARE_SECONDS``. Using the decorators in
    minutes.  
    328320Template fragment caching
    329321=========================
    330322
    331 .. versionadded:: 1.0
    332 
    333323If you're after even more control, you can also cache template fragments using
    334324the ``cache`` template tag. To give your template access to this tag, put
    335325``{% load cache %}`` near the top of your template.
    get() can take a ``default`` argument::  
    406396    >>> cache.get('my_key', 'has expired')
    407397    'has expired'
    408398
    409 .. versionadded:: 1.0
    410 
    411399To add a key only if it doesn't already exist, use the ``add()`` method.
    412400It takes the same parameters as ``set()``, but it will not attempt to
    413401update the cache if the key specified is already present::
  • docs/topics/db/models.txt

    diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt
    index a655c4e..3600425 100644
    a b work; all are optional.  
    360360Extra fields on many-to-many relationships
    361361~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    362362
    363 .. versionadded:: 1.0
    364 
    365363When you're only dealing with simple many-to-many relationships such as
    366364mixing and matching pizzas and toppings, a standard :class:`~django.db.models.ManyToManyField` is all you need. However, sometimes
    367365you may need to associate data with the relationship between two models.
    can be made; see :ref:`the model field reference <ref-onetoone>` for details.  
    525523
    526524.. _One-to-one relationship model example: http://www.djangoproject.com/documentation/models/one_to_one/
    527525
    528 .. versionadded:: 1.0
    529 
    530526:class:`~django.db.models.OneToOneField` fields also accept one optional argument
    531527described in the :ref:`model field reference <ref-onetoone>`.
    532528
    particular database engine.  
    578574Custom field types
    579575------------------
    580576
    581 .. versionadded:: 1.0
    582 
    583577If one of the existing model fields cannot be used to fit your purposes, or if
    584578you wish to take advantage of some less common database column types, you can
    585579create your own field class. Full coverage of creating your own fields is
    query.  
    760754Model inheritance
    761755=================
    762756
    763 .. versionadded:: 1.0
    764 
    765757Model inheritance in Django works almost identically to the way normal
    766758class inheritance works in Python. The only decision you have to make
    767759is whether you want the parent models to be models in their own right
  • docs/topics/db/queries.txt

    diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt
    index 1460fb2..98d1a36 100644
    a b those latter objects, you could write::  
    434434Spanning multi-valued relationships
    435435~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    436436
    437 .. versionadded:: 1.0
    438 
    439437When you are filtering an object based on a ``ManyToManyField`` or a reverse
    440438``ForeignKeyField``, there are two different sorts of filter you may be
    441439interested in. Consider the ``Blog``/``Entry`` relationship (``Blog`` to
    complete query set::  
    708706Updating multiple objects at once
    709707=================================
    710708
    711 .. versionadded:: 1.0
    712 
    713709Sometimes you want to set a field to a particular value for all the objects in
    714710a ``QuerySet``. You can do this with the ``update()`` method. For example::
    715711
    standpoint. For instructions, see :ref:`topics-db-sql`.  
    993989Finally, it's important to note that the Django database layer is merely an
    994990interface to your database. You can access your database via other tools,
    995991programming languages or database frameworks; there's nothing Django-specific
    996 about your database.
    997  No newline at end of file
     992about your database.
  • docs/topics/email.txt

    diff --git a/docs/topics/email.txt b/docs/topics/email.txt
    index 2521385..875cc70 100644
    a b from the request's POST data, sends that to admin@example.com and redirects to  
    181181The EmailMessage and SMTPConnection classes
    182182===========================================
    183183
    184 .. versionadded:: 1.0
    185 
    186184Django's ``send_mail()`` and ``send_mass_mail()`` functions are actually thin
    187185wrappers that make use of the ``EmailMessage`` and ``SMTPConnection`` classes
    188186in ``django.core.mail``.  If you ever need to customize the way Django sends
  • docs/topics/files.txt

    diff --git a/docs/topics/files.txt b/docs/topics/files.txt
    index f4cb672..5a4d07e 100644
    a b  
    44Managing files
    55==============
    66
    7 .. versionadded:: 1.0
    8 
    97This document describes Django's file access APIs.
    108
    119By default, Django stores files locally, using the :setting:`MEDIA_ROOT` and
  • docs/topics/forms/index.txt

    diff --git a/docs/topics/forms/index.txt b/docs/topics/forms/index.txt
    index 5cc76bd..846233f 100644
    a b There are three code paths here:  
    115115    3. If the form has been submitted but is invalid, the bound form instance is
    116116       passed on to the template.
    117117
    118 .. versionchanged:: 1.0
    119     The ``cleaned_data`` attribute was called ``clean_data`` in earlier releases.
    120 
    121118The distinction between **bound** and **unbound** forms is important. An unbound
    122119form does not have any data associated with it; when rendered to the user, it
    123120will be empty or will contain default values. A bound form does have submitted
  • docs/topics/http/file-uploads.txt

    diff --git a/docs/topics/http/file-uploads.txt b/docs/topics/http/file-uploads.txt
    index 24ff0eb..6875d11 100644
    a b File Uploads  
    66
    77.. currentmodule:: django.core.files
    88
    9 .. versionadded:: 1.0
    10 
    119Most Web sites wouldn't be complete without a way to upload files. When Django
    1210handles a file upload, the file data ends up placed in ``request.FILES`` (for
    1311more on the ``request`` object see the documentation for :ref:`request and
  • docs/topics/http/sessions.txt

    diff --git a/docs/topics/http/sessions.txt b/docs/topics/http/sessions.txt
    index 81d4917..9818fa5 100644
    a b To enable session functionality, do the following:  
    2525      and run ``manage.py syncdb`` to install the single database table
    2626      that stores session data.
    2727
    28 .. versionchanged:: 1.0
    29    This step is optional if you're not using the database session backend;
    30    see `configuring the session engine`_.
    31 
    3228If you don't want to use sessions, you might as well remove the
    3329``SessionMiddleware`` line from ``MIDDLEWARE_CLASSES`` and ``'django.contrib.sessions'``
    3430from your ``INSTALLED_APPS``. It'll save you a small bit of overhead.
    from your ``INSTALLED_APPS``. It'll save you a small bit of overhead.  
    3632Configuring the session engine
    3733==============================
    3834
    39 .. versionadded:: 1.0
    40 
    4135By default, Django stores sessions in your database (using the model
    4236``django.contrib.sessions.models.Session``). Though this is convenient, in
    4337some setups it's faster to store session data elsewhere, so Django can be
    A session object has the following standard dictionary methods:  
    109103
    110104    * ``clear()``
    111105
    112 .. versionadded:: 1.0
    113    ``setdefault()`` and ``clear()`` are new in this version.
    114 
    115106It also has these methods:
    116107
    117108    * ``flush()``
    118109
    119       .. versionadded:: 1.0
    120 
    121110      Delete the current session data from the database and regenerate the
    122111      session key value that is sent back to the user in the cookie. This is
    123112      used if you want to ensure that the previous session data can't be
    It also has these methods:  
    144133
    145134    * ``set_expiry(value)``
    146135
    147       .. versionadded:: 1.0
    148 
    149136      Sets the expiration time for the session. You can pass a number of
    150137      different values:
    151138
    It also has these methods:  
    165152
    166153    * ``get_expiry_age()``
    167154
    168       .. versionadded:: 1.0
    169 
    170155      Returns the number of seconds until this session expires. For sessions
    171156      with no custom expiration (or those set to expire at browser close), this
    172157      will equal ``settings.SESSION_COOKIE_AGE``.
    173158
    174159    * ``get_expiry_date()``
    175160
    176       .. versionadded:: 1.0
    177 
    178161      Returns the date this session will expire. For sessions with no custom
    179162      expiration (or those set to expire at browser close), this will equal the
    180163      date ``settings.SESSION_COOKIE_AGE`` seconds from now.
    181164
    182165    * ``get_expire_at_browser_close()``
    183166
    184       .. versionadded:: 1.0
    185 
    186167      Returns either ``True`` or ``False``, depending on whether the user's
    187168      session cookie will expire when the user's Web browser is closed.
    188169
    Here's a typical usage example::  
    269250Using sessions out of views
    270251===========================
    271252
    272 .. versionadded:: 1.0
    273 
    274253An API is available to manipulate session data outside of a view::
    275254
    276255    >>> from django.contrib.sessions.backends.db import SessionStore
    browser-length cookies -- cookies that expire as soon as the user closes his or  
    351330her browser. Use this if you want people to have to log in every time they open
    352331a browser.
    353332
    354 .. versionadded:: 1.0
    355 
    356333This setting is a global default and can be overwritten at a per-session level
    357334by explicitly calling ``request.session.set_expiry()`` as described above in
    358335`using sessions in views`_.
    A few :ref:`Django settings <ref-settings>` give you control over session behavi  
    382359SESSION_ENGINE
    383360--------------
    384361
    385 .. versionadded:: 1.0
    386 
    387362Default: ``django.contrib.sessions.backends.db``
    388363
    389364Controls where Django stores session data. Valid values are:
    See `configuring the session engine`_ for more details.  
    397372SESSION_FILE_PATH
    398373-----------------
    399374
    400 .. versionadded:: 1.0
    401 
    402375Default: ``/tmp/``
    403376
    404377If you're using file-based session storage, this sets the directory in
  • docs/topics/http/shortcuts.txt

    diff --git a/docs/topics/http/shortcuts.txt b/docs/topics/http/shortcuts.txt
    index b60ccdd..b02dcc3 100644
    a b Optional arguments  
    4343
    4444``mimetype``
    4545
    46     .. versionadded:: 1.0
    47 
    4846    The MIME type to use for the resulting document. Defaults to the value of
    4947    the :setting:`DEFAULT_CONTENT_TYPE` setting.
    5048
  • docs/topics/http/urls.txt

    diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt
    index db9a348..3845bd0 100644
    a b The remaining arguments should be tuples in this format::  
    220220url
    221221---
    222222
    223 .. versionadded:: 1.0
    224 
    225223You can use the ``url()`` function, instead of a tuple, as an argument to
    226224``patterns()``. This is convenient if you want to specify a name without the
    227225optional extra arguments dictionary. For example::
    the view prefix (as explained in "The view prefix" above) will have no effect.  
    532530Naming URL patterns
    533531===================
    534532
    535 .. versionadded:: 1.0
    536 
    537533It's fairly common to use the same view function in multiple URL patterns in
    538534your URLconf. For example, these two URL patterns both point to the ``archive``
    539535view::
  • docs/topics/i18n.txt

    diff --git a/docs/topics/i18n.txt b/docs/topics/i18n.txt
    index 8ba2f9c..36d7859 100644
    a b following this algorithm:  
    594594   
    595595    * Failing that, it looks for a cookie.
    596596   
    597       .. versionchanged:: 1.0
    598    
    599597      In Django version 0.96 and before, the cookie's name is hard-coded to
    600598      ``django_language``. In Django 1,0, The cookie name is set by the
    601599      ``LANGUAGE_COOKIE_NAME`` setting. (The default name is
  • docs/topics/pagination.txt

    diff --git a/docs/topics/pagination.txt b/docs/topics/pagination.txt
    index 455f62a..e30c5b6 100644
    a b Pagination  
    77.. module:: django.core.paginator
    88   :synopsis: Classes to help you easily manage paginated data.
    99
    10 .. versionchanged:: 1.0
    11    Pagination facilities have been almost fully reworked.
    12 
    1310Django provides a few classes that help you manage paginated data -- that is,
    1411data that's split across several pages, with "Previous/Next" links. These
    1512classes live in :file:`django/core/paginator.py`.
  • docs/topics/templates.txt

    diff --git a/docs/topics/templates.txt b/docs/topics/templates.txt
    index 66361c8..e0ac9ba 100644
    a b wouldn't know which one of the blocks' content to use.  
    397397Automatic HTML escaping
    398398=======================
    399399
    400 .. versionadded:: 1.0
    401 
    402400When generating HTML from templates, there's always a risk that a variable will
    403401include characters that affect the resulting HTML. For example, consider this
    404402template fragment::
    template (e.g., one that has ``{% extends "foo.html" %}``) will *not* have  
    645643access to the comments template tags and filters. The child template is
    646644responsible for its own ``{% load comments %}``.
    647645
    648 This is a feature for the sake of maintainability and sanity.
    649  No newline at end of file
     646This is a feature for the sake of maintainability and sanity.
  • docs/topics/testing.txt

    diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt
    index 0916f52..bc8f7f0 100644
    a b with this command::  
    257257
    258258Note that we used ``animals``, not ``myproject.animals``.
    259259
    260 .. versionadded:: 1.0
    261    You can now choose which test to run.
    262 
    263260If you use unit tests, as opposed to
    264261doctests, you can be even *more* specific in choosing which tests to execute.
    265262To run a single test case in an application (for example, the
    etc. The test database is created by the user specified by  
    296293:setting:`DATABASE_USER`, so you'll need to make sure that the given user
    297294account has sufficient privileges to create a new database on the system.
    298295
    299 .. versionadded:: 1.0
    300 
    301296For fine-grained control over the
    302297character encoding of your test database, use the
    303298:setting:`TEST_DATABASE_CHARSET` setting. If you're using MySQL, you can also
    arguments at time of construction:  
    546541
    547542    .. method:: Client.login(**credentials)
    548543
    549         .. versionadded:: 1.0
    550 
    551544        If your site uses Django's :ref:`authentication system<topics-auth>`
    552545        and you deal with logging in users, you can use the test client's
    553546        ``login()`` method to simulate the effect of a user logging into the
    arguments at time of construction:  
    586579
    587580    .. method:: Client.logout()
    588581
    589         .. versionadded:: 1.0
    590 
    591582        If your site uses Django's :ref:`authentication system<topics-auth>`,
    592583        the ``logout()`` method can be used to simulate the effect of a user
    593584        logging out of your site.
    additions.  
    734725Default test client
    735726~~~~~~~~~~~~~~~~~~~
    736727
    737 .. versionadded:: 1.0
    738 
    739728.. attribute:: TestCase.client
    740729
    741730Every test case in a ``django.test.TestCase`` instance has access to an
    or by the order of test execution.  
    835824URLconf configuration
    836825~~~~~~~~~~~~~~~~~~~~~
    837826
    838 .. versionadded:: 1.0
    839 
    840827.. attribute:: TestCase.urls
    841828
    842829If your application provides views, you may want to include tests that use the
    URLconf for the duration of the test case.  
    870857Emptying the test outbox
    871858~~~~~~~~~~~~~~~~~~~~~~~~
    872859
    873 .. versionadded:: 1.0
    874 
    875860If you use Django's custom ``TestCase`` class, the test runner will clear the
    876861contents of the test e-mail outbox at the start of each test case.
    877862
    For more detail on e-mail services during tests, see `E-mail services`_.  
    880865Assertions
    881866~~~~~~~~~~
    882867
    883 .. versionadded:: 1.0
    884 
    885868As Python's normal ``unittest.TestCase`` class implements assertion methods
    886869such as ``assertTrue`` and ``assertEquals``, Django's custom ``TestCase`` class
    887870provides a number of custom assertion methods that are useful for testing Web
    applications:  
    934917E-mail services
    935918---------------
    936919
    937 .. versionadded:: 1.0
    938 
    939920If any of your Django views send e-mail using :ref:`Django's e-mail
    940921functionality <topics-email>`, you probably don't want to send e-mail each time
    941922you run a test using that view. For this reason, Django's test runner
    that can be executed from Python code.  
    10261007Defining a test runner
    10271008----------------------
    10281009
    1029 .. versionadded:: 1.0
    1030 
    10311010.. currentmodule:: django.test.simple
    10321011
    10331012By convention, a test runner should be called ``run_tests``. The only strict
    provides some utilities that can be useful during testing.  
    11061085    ``create_test_db()`` has the side effect of modifying
    11071086    ``settings.DATABASE_NAME`` to match the name of the test database.
    11081087
    1109     .. versionchanged:: 1.0
    1110        ``create_test_db()`` now returns the name of the test database.
    1111 
    11121088.. function:: destroy_test_db(old_database_name, verbosity=1)
    11131089
    11141090    Destroys the database whose name is in the :setting:`DATABASE_NAME` setting
Back to Top