1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

Fixed #8911 -- Several corrections for the 1.0 porting documentation, thanks arien.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8979 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Gary Wilson Jr 2008-09-07 19:15:41 +00:00
parent 165b55828a
commit acf2600a4c

View File

@ -42,7 +42,7 @@ Rename ``maxlength`` to ``max_length``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rename your ``maxlength`` argument to ``max_length`` (this was changed to be
consistant with form fields):
consistent with form fields):
Replace ``__str__`` with ``__unicode__``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -473,7 +473,7 @@ New (1.0)::
import datetime
class Article(models.Model):
title = models.CharField(maxlength=100)
title = models.CharField(max_length=100)
published = models.DateField(default=datetime.datetime.now)
``DecimalField`` is new, and ``FloatField`` is now a proper float
@ -536,7 +536,7 @@ Notes:
this procedure for any of the standard Django models.
If something goes wrong in the above process, just copy your backed up
database file over the top of the original file and start again.
database file over the original file and start again.
Internationalization
--------------------
@ -644,10 +644,10 @@ Syndication
``Feed.__init__`` has changed
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``__init__()`` parameters in the syndication framework's ``Feed`` class now
take an ``HttpRequest`` object as its second parameter, instead of the feed's
The ``__init__()`` method of the syndication framework's ``Feed`` class now
takes an ``HttpRequest`` object as its second parameter, instead of the feed's
URL. This allows the syndication framework to work without requiring the sites
framework. This only affects code that subclass ``Feed`` and overrides the
framework. This only affects code that subclasses ``Feed`` and overrides the
``__init__()`` method, and code that calls ``Feed.__init__()`` directly.
Data structures
@ -656,8 +656,8 @@ Data structures
``SortedDictFromList`` is gone
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
`django.newforms.forms.SortedDictFromList`` was removed.
:class:`django.utils.datastructures.SortedDict`` can now be instantiated with
``django.newforms.forms.SortedDictFromList`` was removed.
:class:`django.utils.datastructures.SortedDict` can now be instantiated with
a sequence of tuples.
To update your code:
@ -665,9 +665,9 @@ To update your code:
1. Use :class:`django.utils.datastructures.SortedDict` wherever you were
using ``django.newforms.forms.SortedDictFromList``.
2. Because :meth:`django.utils.datastructures.SortedDict.copy` returns a
deepcopy as ``SortedDictFromList`` method did, you will need to update
your code if you were relying on a deepcopy. Do this by using
2. Because :meth:`django.utils.datastructures.SortedDict.copy` doesn't
return a deepcopy as ``SortedDictFromList.copy()`` did, you will need
to update your code if you were relying on a deepcopy. Do this by using
``copy.deepcopy`` directly.
Database backend functions